From ff2b8f6e5c389d32460009af8f2fbf1aa42852c6 Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 31 Aug 2016 01:42:43 +0200 Subject: [PATCH] Use NOT_FOUND instead of GONE Thunderbird doesn't recognize the status code correctly and shows an synchronization error. --- radicale/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index 8e76d82..0931b81 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -54,8 +54,6 @@ NOT_ALLOWED = (client.FORBIDDEN, {"Content-type": "text/plain"}, "Access to the requested resource forbidden.") NOT_FOUND = (client.NOT_FOUND, {"Content-type": "text/plain"}, "The requested resource could not be found.") -GONE = (client.GONE, {"Content-type": "text/plain"}, - "The requested resource is no longer available.") WEBDAV_PRECONDITION_FAILED = (client.CONFLICT, {"Content-type": "text/plain"}, "WebDAV precondition failed.") PRECONDITION_FAILED = (client.PRECONDITION_FAILED, @@ -425,7 +423,7 @@ class Application: if not self._access(user, path, "w", item): return NOT_ALLOWED if not item: - return GONE + return NOT_FOUND if_match = environ.get("HTTP_IF_MATCH", "*") if if_match not in ("*", item.etag): # ETag precondition not verified, do not delete item @@ -519,7 +517,7 @@ class Application: if not self._access(user, to_path, "w", item): return NOT_ALLOWED if not item: - return GONE + return NOT_FOUND if isinstance(item, self.Collection): return WEBDAV_PRECONDITION_FAILED