[CalendarServer-changes] [14376] CalendarServer/branches/release/CalendarServer-5.4-dev/ twistedcaldav/storebridge.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Feb 5 12:12:23 PST 2015


Revision: 14376
          http://trac.calendarserver.org//changeset/14376
Author:   cdaboo at apple.com
Date:     2015-02-05 12:12:23 -0800 (Thu, 05 Feb 2015)
Log Message:
-----------
Fix for If-Schedule-Tag-Match behavior and splitting.

Modified Paths:
--------------
    CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/storebridge.py

Modified: CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/storebridge.py	2015-02-05 20:11:21 UTC (rev 14375)
+++ CalendarServer/branches/release/CalendarServer-5.4-dev/twistedcaldav/storebridge.py	2015-02-05 20:12:23 UTC (rev 14376)
@@ -2947,6 +2947,16 @@
         if not self.exists():
             raise HTTPError(NOT_FOUND)
 
+        # Do schedule tag check
+        try:
+            self.validIfScheduleMatch(request)
+        except HTTPError as e:
+            if e.response.code == responsecode.PRECONDITION_FAILED:
+                response = yield self._processPrefer(request, e.response)
+                raise HTTPError(response)
+            else:
+                raise
+
         # Split point is in the rid query parameter
         rid = request.args.get("rid")
         if rid is None:
@@ -2990,6 +3000,8 @@
         if returnRepresentation:
             etag1 = yield self.etag()
             etag2 = yield other.etag()
+            scheduletag1 = self.scheduleTag
+            scheduletag2 = otherStoreObject.scheduleTag
             cal1 = yield self.component()
             cal2 = yield other.component()
 
@@ -2999,6 +3011,7 @@
                     davxml.PropertyStatus(
                         davxml.PropertyContainer(
                             davxml.GETETag.fromString(etag1.generate()),
+                            caldavxml.ScheduleTag.fromString(scheduletag1),
                             caldavxml.CalendarData.fromCalendar(cal1),
                         ),
                         davxml.Status.fromResponseCode(OK),
@@ -3009,6 +3022,7 @@
                     davxml.PropertyStatus(
                         davxml.PropertyContainer(
                             davxml.GETETag.fromString(etag2.generate()),
+                            caldavxml.ScheduleTag.fromString(scheduletag2),
                             caldavxml.CalendarData.fromCalendar(cal2),
                         ),
                         davxml.Status.fromResponseCode(OK),
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150205/c885fcbe/attachment.html>


More information about the calendarserver-changes mailing list