mirror of
https://github.com/Kozea/Radicale.git
synced 2025-07-02 16:58:30 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -565,7 +565,7 @@ def report(path, xml_request, collection):
|
||||||
# TODO: fix this
|
# TODO: fix this
|
||||||
if hreference.split("/")[-1] == item.href:
|
if hreference.split("/")[-1] == item.href:
|
||||||
# Happening when depth is 0
|
# Happening when depth is 0
|
||||||
uri = "/" + hreference
|
uri = hreference
|
||||||
else:
|
else:
|
||||||
# Happening when depth is 1
|
# Happening when depth is 1
|
||||||
uri = posixpath.join(hreference, item.href)
|
uri = posixpath.join(hreference, item.href)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue