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/`.
This commit is contained in:
parent
bf8bd90bcb
commit
1b1ba421ff
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user