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

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 14 19:36:18 PDT 2007


Revision: 1393
          http://trac.macosforge.org/projects/calendarserver/changeset/1393
Author:   cdaboo at apple.com
Date:     2007-03-14 19:36:18 -0700 (Wed, 14 Mar 2007)

Log Message:
-----------
multiget must properly decode the DAV:href's.

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-15 02:28:20 UTC (rev 1392)
+++ CalendarServer/trunk/twistedcaldav/method/report_multiget.py	2007-03-15 02:36:18 UTC (rev 1393)
@@ -33,6 +33,8 @@
 from twistedcaldav.caldavxml import caldav_namespace
 from twistedcaldav.method import report_common
 
+from urllib import unquote
+
 max_number_of_multigets = 5000
 
 def report_urn_ietf_params_xml_ns_caldav_calendar_multiget(self, request, multiget):
@@ -120,10 +122,12 @@
 
     if not disabled:
         for href in resources:
+
+            resource_uri = unquote(str(href))
+
             # Do href checks
             if requestURIis == "calendar":
                 # Verify that href is an immediate child of the request URI and that resource exists.
-                resource_uri = str(href)
                 name = resource_uri[resource_uri.rfind("/") + 1:]
                 if not self._isChildURI(request, resource_uri) or self.getChild(name) is None:
                     responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.NOT_FOUND)))
@@ -139,7 +143,6 @@
                 child = child.getResult()
     
             elif requestURIis == "collection":
-                resource_uri = str(href)
                 name = resource_uri[resource_uri.rfind("/") + 1:]
                 if not self._isChildURI(request, resource_uri, False):
                     responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.NOT_FOUND)))
@@ -181,7 +184,6 @@
                     filteredaces = filteredaces.getResult()
     
             else:
-                resource_uri = str(href)
                 name = resource_uri[resource_uri.rfind("/") + 1:]
                 if (resource_uri != request.uri) or not self.exists():
                     responses.append(davxml.StatusResponse(href, davxml.Status.fromResponseCode(responsecode.NOT_FOUND)))

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


More information about the calendarserver-changes mailing list