[CalendarServer-changes] [1365] CalendarServer/trunk/twistedcaldav/method/report_multiget.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Mar 13 12:09:58 PDT 2007


Revision: 1365
          http://trac.macosforge.org/projects/calendarserver/changeset/1365
Author:   cdaboo at apple.com
Date:     2007-03-13 12:09:58 -0700 (Tue, 13 Mar 2007)

Log Message:
-----------
Allow a multiget report to override the default max. results value. Often user calendars have > 1000 items in them
and the client ought to be able to fetch them all in one go.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/method/report_multiget.py

Modified: CalendarServer/trunk/twistedcaldav/method/report_multiget.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/report_multiget.py	2007-03-13 17:26:55 UTC (rev 1364)
+++ CalendarServer/trunk/twistedcaldav/method/report_multiget.py	2007-03-13 19:09:58 UTC (rev 1365)
@@ -28,12 +28,13 @@
 from twisted.web2.dav import davxml
 from twisted.web2.dav.element.base import dav_namespace
 from twisted.web2.dav.http import ErrorResponse, MultiStatusResponse
-from twisted.web2.dav.method.report import max_number_of_matches
 from twisted.web2.http import HTTPError, StatusResponse
 
 from twistedcaldav.caldavxml import caldav_namespace
 from twistedcaldav.method import report_common
 
+max_number_of_multigets = 5000
+
 def report_urn_ietf_params_xml_ns_caldav_calendar_multiget(self, request, multiget):
     """
     Generate a multiget REPORT.
@@ -76,7 +77,7 @@
         raise AssertionError("We shouldn't be here")
 
     # Check size of results is within limit
-    if len(resources) > max_number_of_matches:
+    if len(resources) > max_number_of_multigets:
         log.err("Too many results in multiget report: %d" % len(resources))
         raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (dav_namespace, "number-of-matches-within-limits")))
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070313/eb393505/attachment.html


More information about the calendarserver-changes mailing list