From 1b1ba421ffd52b9b4c14f1eb3fb29059d8a5e994 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Tue, 19 Apr 2016 21:44:00 +0200 Subject: [PATCH] Fix double slash in REPORT responses When doing REPORTs with absolute paths as hrefs, the response hrefs contain a double slash at the beginning. This breaks URL parsers and makes them assume they have a URL without protocol of the format `//example.com/foo/bar/`. --- radicale/xmlutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 12d21e1..daa3e4a 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -565,7 +565,7 @@ def report(path, xml_request, collection): # TODO: fix this if hreference.split("/")[-1] == item.href: # Happening when depth is 0 - uri = "/" + hreference + uri = hreference else: # Happening when depth is 1 uri = posixpath.join(hreference, item.href)