From 5dcc42aa37fe6d883d05c56aca6ccd872771e57d Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Fri, 15 Oct 2010 12:27:59 +0300 Subject: [PATCH] Doc webdav: fix Report for rel+abs URIs At Evolution, the request is absolute, so make sure it matches our relative representation of the URL. bzr revid: p_christ@hol.gr-20101015092759-ahhiygd1u9dcny8s --- addons/document_webdav/dav_fs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/document_webdav/dav_fs.py b/addons/document_webdav/dav_fs.py index 4665610524e..3e8e1c2b3e5 100644 --- a/addons/document_webdav/dav_fs.py +++ b/addons/document_webdav/dav_fs.py @@ -323,11 +323,15 @@ class openerp_dav_handler(dav_interface): for tx in hr.childNodes: if tx.nodeType == hr.TEXT_NODE: turi += tx.data - + if not turi.startswith('/'): + # it may be an absolute URL, decode to the + # relative part, because ul is relative, anyway + uparts=urlparse.urlparse(turi) + turi=uparts[2] if turi.startswith(ul): result.append( turi[len(self.parent.davpath):]) else: - self.parent.log_error("ignore href %s because it is not under request path", turi) + self.parent.log_error("ignore href %s because it is not under request path %s", turi, ul) return result # We don't want to continue with the children found below # Note the exceptions and that 'finally' will close the