From 9b0993e74c77282bf0dbe6726421dc1e5450b7d7 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Tue, 18 Jan 2011 18:50:21 +0200 Subject: webdav: ';' in name not handled correctly [Bug 704444] Reported by: Dr. Ferdinand Gassauer Locations that contain a semicolon are split by the urlparse.urlparse(), thus setting their 'path' and 'params' return fields (rather than just the 'path'). In our syntax, there is no params, so the part after the semicolon needs to be appended back to the patch. bzr revid: p_christ@hol.gr-20110118165021-4knt76njdqnt1eln --- addons/document_webdav/webdav.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'addons/document_webdav/webdav.py') diff --git a/addons/document_webdav/webdav.py b/addons/document_webdav/webdav.py index 1b60ade698f..3a68fb04fed 100644 --- a/addons/document_webdav/webdav.py +++ b/addons/document_webdav/webdav.py @@ -167,6 +167,8 @@ def mk_prop_response(self, uri, good_props, bad_props, doc): # write href information uparts=urlparse.urlparse(uri) fileloc=uparts[2] + if uparts[3]: + fileloc += ';' + uparts[3] if isinstance(fileloc, unicode): fileloc = fileloc.encode('utf-8') href=doc.createElement("D:href") @@ -246,6 +248,8 @@ def mk_propname_response(self,uri,propnames,doc): # write href information uparts=urlparse.urlparse(uri) fileloc=uparts[2] + if uparts[3]: + fileloc += ';' + uparts[3] if isinstance(fileloc, unicode): fileloc = fileloc.encode('utf-8') href=doc.createElement("D:href") @@ -303,6 +307,8 @@ def mk_lock_response(self, uri, props): # write href information uparts=urlparse.urlparse(uri) fileloc=uparts[2] + if uparts[3]: + fileloc += ';' + uparts[3] if isinstance(fileloc, unicode): fileloc = fileloc.encode('utf-8') davpath = self.parent.get_davpath() -- cgit v1.2.3