[CalendarServer-users] Modifying entries fails with evolution-2.6 due to wrong etag

Guido Guenther agx at sigxcpu.org
Sat Sep 16 07:34:12 PDT 2006

when trying to modify an already defined date with evolution 2.6 I get:

If-Match: W/"5005B-3D3-450BE897"

HTTP/1.1 412 Precondition Failed
Date: Sat, 16 Sep 2006 13:13:53 GMT
DAV: 1, access-control, calendar-access, calendar-schedule
Content-Type: text/html
Content-Length: 157
Server: Twisted/2.4.0 TwistedWeb/[twisted.web2, version 0.2.0] TwistedCalDAV/unknown

<html><head><title>Precondition Failed</title></head><body><h1>Precondition Failed</h1><p>Requested resource does not have a matching ETag.</p></body></html>

This is due to the fact that matchEtag fails. The etags match but not
the allowWeak flag. This patch lets evolution update entries:

--- twisted/web2/http.py.orig 2006-09-16 16:01:13.000000000 +0200
+++ twisted/web2/http.py	2006-09-16 16:23:12.000000000 +0200
@@ -253,7 +255,7 @@
     # If either one fails, we return PRECONDITION_FAILED
     match = request.headers.getHeader("if-match")
     if match:
-        if not matchETag(match, False):
+        if not matchETag(match, True):
             raise HTTPError(StatusResponse(responsecode.PRECONDITION_FAILED, "Requested resource does not have a matching ETag."))
     unmod_since = request.headers.getHeader("if-unmodified-since")

But I'm not sure that's what's intended. Who's at fault here evo or the
 -- Guido

More information about the calendarserver-users mailing list