[CalendarServer-changes] [9311] CalendarServer/trunk/contrib/performance/loadtest/ical.py

source_changes at macosforge.org source_changes at macosforge.org
Wed May 30 10:22:48 PDT 2012


Revision: 9311
          http://trac.macosforge.org/projects/calendarserver/changeset/9311
Author:   cdaboo at apple.com
Date:     2012-05-30 10:22:48 -0700 (Wed, 30 May 2012)
Log Message:
-----------
Also handle 302 redirects on .well-known.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/ical.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ical.py	2012-05-30 03:14:37 UTC (rev 9310)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py	2012-05-30 17:22:48 UTC (rev 9311)
@@ -42,7 +42,7 @@
 from twisted.python.util import FancyEqMixin
 from twisted.web.client import Agent, ContentDecoderAgent, GzipDecoder
 from twisted.web.http import OK, MULTI_STATUS, CREATED, NO_CONTENT, PRECONDITION_FAILED, MOVED_PERMANENTLY,\
-    FORBIDDEN
+    FORBIDDEN, FOUND
 from twisted.web.http_headers import Headers
 
 from twistedcaldav.ical import Component, Property
@@ -562,12 +562,12 @@
         response, result = yield self._propfind(
             location,
             self._STARTUP_WELL_KNOWN,
-            allowedStatus=(MULTI_STATUS, MOVED_PERMANENTLY),
+            allowedStatus=(MULTI_STATUS, MOVED_PERMANENTLY, FOUND, ),
             method_label="PROPFIND{well-known}",
         )
         
         # Follow any redirect
-        if response.code == MOVED_PERMANENTLY:
+        if response.code in (MOVED_PERMANENTLY, FOUND, ):
             location = response.headers.getRawHeaders("location")[0]
             location = urlsplit(location)[2]
             response, result = yield self._propfind(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120530/a7cfd03b/attachment-0001.html>


More information about the calendarserver-changes mailing list