Use 403 response for supported-report and valid-sync-token errors
Some clients don't handle 409
This commit is contained in:
parent
e63a6e0c85
commit
7ed5122636
@ -59,7 +59,7 @@ def xml_report(base_prefix, path, xml_request, collection, encoding,
|
|||||||
collection.get_meta("tag") not in ("VADDRESSBOOK", "VCALENDAR")):
|
collection.get_meta("tag") not in ("VADDRESSBOOK", "VCALENDAR")):
|
||||||
logger.warning("Invalid REPORT method %r on %r requested",
|
logger.warning("Invalid REPORT method %r on %r requested",
|
||||||
xmlutils.make_human_tag(root.tag), path)
|
xmlutils.make_human_tag(root.tag), path)
|
||||||
return (client.CONFLICT,
|
return (client.FORBIDDEN,
|
||||||
xmlutils.webdav_error("D:supported-report"))
|
xmlutils.webdav_error("D:supported-report"))
|
||||||
prop_element = root.find(xmlutils.make_clark("D:prop"))
|
prop_element = root.find(xmlutils.make_clark("D:prop"))
|
||||||
props = (
|
props = (
|
||||||
@ -92,7 +92,8 @@ def xml_report(base_prefix, path, xml_request, collection, encoding,
|
|||||||
# Invalid sync token
|
# Invalid sync token
|
||||||
logger.warning("Client provided invalid sync token %r: %s",
|
logger.warning("Client provided invalid sync token %r: %s",
|
||||||
old_sync_token, e, exc_info=True)
|
old_sync_token, e, exc_info=True)
|
||||||
return (client.CONFLICT,
|
# client.CONFLICT doesn't work with some clients (e.g. InfCloud)
|
||||||
|
return (client.FORBIDDEN,
|
||||||
xmlutils.webdav_error("D:valid-sync-token"))
|
xmlutils.webdav_error("D:valid-sync-token"))
|
||||||
hreferences = (pathutils.unstrip_path(
|
hreferences = (pathutils.unstrip_path(
|
||||||
posixpath.join(collection.path, n)) for n in names)
|
posixpath.join(collection.path, n)) for n in names)
|
||||||
|
Loading…
Reference in New Issue
Block a user