summaryrefslogtreecommitdiff
path: root/addons/document_webdav
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2010-10-15 12:27:59 +0300
committerP. Christeas <p_christ@hol.gr>2010-10-15 12:27:59 +0300
commit5dcc42aa37fe6d883d05c56aca6ccd872771e57d (patch)
tree73f259ae1ac942956cbb0f8e05ab67a7b00528ee /addons/document_webdav
parent788ed06b80f00953a0623559a03af537e0a34bcf (diff)
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
Diffstat (limited to 'addons/document_webdav')
-rw-r--r--addons/document_webdav/dav_fs.py8
1 files 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