1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Set Content-Length for HEAD requests

This commit is contained in:
Unrud 2022-01-15 22:32:38 +01:00
parent b93842b10c
commit 4a0bcde7a3
3 changed files with 8 additions and 6 deletions

View file

@ -382,8 +382,9 @@ permissions: RrWw""")
assert xml.find(xmlutils.make_clark("C:no-uid-conflict")) is not None
def test_head(self) -> None:
status, _, _ = self.request("HEAD", "/")
status, headers, answer = self.request("HEAD", "/")
assert status == 302
assert int(headers.get("Content-Length", "0")) > 0 and not answer
def test_options(self) -> None:
status, headers, _ = self.request("OPTIONS", "/")