Revision
9311
Author
cdaboo@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

Diff

Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py (9310 => 9311)


--- 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(