[CalendarServer-changes] [8624] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Feb 2 08:39:02 PST 2012


Revision: 8624
          http://trac.macosforge.org/projects/calendarserver/changeset/8624
Author:   cdaboo at apple.com
Date:     2012-02-02 08:39:02 -0800 (Thu, 02 Feb 2012)
Log Message:
-----------
Make sure that etag always changes when schedule-tag changes,

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/method/put_common.py
    CalendarServer/trunk/txdav/caldav/datastore/sql.py

Modified: CalendarServer/trunk/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_common.py	2012-02-02 16:38:20 UTC (rev 8623)
+++ CalendarServer/trunk/twistedcaldav/method/put_common.py	2012-02-02 16:39:02 UTC (rev 8624)
@@ -1072,7 +1072,7 @@
                     etags = self.destination.scheduleEtags
                     if etags is None:
                         etags = ()
-                etags += (hashlib.md5(data).hexdigest(),)
+                etags += (hashlib.md5(data + (self.destination.scheduleTag if self.destination.scheduleTag else "")).hexdigest(),)
                 self.destination.scheduleEtags = etags
             else:
                 self.destination.scheduleEtags = ()                

Modified: CalendarServer/trunk/txdav/caldav/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/sql.py	2012-02-02 16:38:20 UTC (rev 8623)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql.py	2012-02-02 16:39:02 UTC (rev 8624)
@@ -807,7 +807,7 @@
 
             # CALENDAR_OBJECT table update
             self._uid = component.resourceUID()
-            self._md5 = hashlib.md5(componentText).hexdigest()
+            self._md5 = hashlib.md5(componentText + (self._schedule_tag if self._schedule_tag else "")).hexdigest()
             self._size = len(componentText)
 
             # Special - if migrating we need to preserve the original md5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120202/dd2ec794/attachment-0001.html>


More information about the calendarserver-changes mailing list