Your message dated Tue, 29 Apr 2008 23:36:09 +0100
with message-id <[EMAIL PROTECTED]>
and subject line python-davlib has been removed from Debian, closing #428662
has caused the Debian Bug report #428662,
regarding setprops and delprops methods are broken, they fail when handling
multiple properties
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)
--
428662: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=428662
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: python-davlib
Version: 1.8-4
The setprops and delprops functions are BROKEN, and do not conform to the
WebDAV protocol.
Specifically, they will only work when setting, or deleting /one/ property
at a time. Though the code was clearly written to handle /multiple/
properties.
When handling multiple properties the request will /not/ be a legal WebDAV
request, and will not work.
The PROPPATCH request specification is here:
http://www.webdav.org/specs/rfc2518.html#METHOD_PROPPATCH
The specification of how a <propertyupdate/> element of such a request
should be is here:
http://www.webdav.org/specs/rfc2518.html#ELEMENT_propertyupdate
The bug is that each <!ELEMENT remove> or <!ELEMENT set> should contain
only ONE property element, and not multiple as the current python-davlib
sends.
EXAMPLE: A multiple properties PROPPATCH request should look like this:
(I'm using <DAV:remove/> but it would be almost the same for <DAV:set/>)
<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:">
<D:remove><D:prop><prop0 xmlns=""></prop0></D:prop></D:remove>
<D:remove><D:prop><prop1 xmlns=""></prop1></D:prop></D:remove>
<D:remove><D:prop><prop2 xmlns=""></prop2></D:prop></D:remove>
</D:propertyupdate>
==================
What the current python-davlib is producing is this:
<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:">
<D:remove><D:prop>
<prop0 xmlns=""></prop0>
<prop1 xmlns=""></prop1>
</D:prop></D:remove>
</D:propertyupdate>
Please apply the attached patch.
Cheers,
--
Francisco Borges
--- /usr/lib/python2.5/site-packages/davlib.py 2006-07-04 23:21:02.000000000 +0200
+++ davlib.py 2007-06-13 12:08:46.000000000 +0200
@@ -283,11 +283,10 @@
else:
xmlns = ns = ''
assert not kw, 'unknown arguments'
+ xmlprops = [ '<DAV:remove><DAV:prop>%s</DAV:prop></DAV:remove>' % i for i in names ]
body = XML_DOC_HEADER + \
- '<DAV:propertyupdate xmlns:DAV="DAV:"' + xmlns + \
- '><DAV:remove><DAV:prop><' + ns + \
- string.joinfields(names, '/><' + ns) + \
- '/></DAV:prop></DAV:remove></DAV:propertyupdate>'
+ '<DAV:propertyupdate xmlns:DAV="DAV:"' + xmlns + '>' + \
+ ''.join(xmlprops) + '</DAV:propertyupdate>'
return self.proppatch(url, body)
def setprops(self, url, *xmlprops, **props):
@@ -304,12 +303,10 @@
xmlprops.append('<%s%s>%s</%s%s>' % (ns, key, value, ns, key))
else:
xmlprops.append('<%s%s/>' % (ns, key))
- elems = string.joinfields(xmlprops, '')
+ xmlprops = [ '<DAV:set><DAV:prop>%s</DAV:prop></DAV:set>' % i for i in xmlprops ]
body = XML_DOC_HEADER + \
- '<DAV:propertyupdate xmlns:DAV="DAV:"' + xmlns + \
- '><DAV:set><DAV:prop>' + \
- elems + \
- '</DAV:prop></DAV:set></DAV:propertyupdate>'
+ '<DAV:propertyupdate xmlns:DAV="DAV:"' + xmlns + '>' + \
+ ''.join(xmlprops) + '</DAV:propertyupdate>'
return self.proppatch(url, body)
def get_lock(self, url, owner='', timeout=None, depth=None):
--- End Message ---
--- Begin Message ---
Version: 1.8-4+rm
The python-davlib package has been removed from Debian testing, unstable and
experimental, so I am now closing the bugs that were still opened
against it.
For more information about this package's removal, read
http://bugs.debian.org/468660 . That bug might give the reasons why
this package was removed, and suggestions of possible replacements.
Don't hesitate to reply to this mail if you have any question.
Thank you for your contribution to Debian.
--
Marco Rodrigues
http://Marco.Tondela.org
--- End Message ---