[CalendarServer-changes] [6751] CalendarServer/trunk/contrib/performance/httpauth.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jan 18 08:37:01 PST 2011
Revision: 6751
http://trac.macosforge.org/projects/calendarserver/changeset/6751
Author: exarkun at twistedmatrix.com
Date: 2011-01-18 08:36:49 -0800 (Tue, 18 Jan 2011)
Log Message:
-----------
Retry authentication even if we sent credentials, since digest credentials can expire. This lets really, really slow benchmarks complete without failing midway due to auth problems.
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/httpauth.py
Modified: CalendarServer/trunk/contrib/performance/httpauth.py
===================================================================
--- CalendarServer/trunk/contrib/performance/httpauth.py 2011-01-18 15:41:17 UTC (rev 6750)
+++ CalendarServer/trunk/contrib/performance/httpauth.py 2011-01-18 16:36:49 UTC (rev 6751)
@@ -70,10 +70,15 @@
def request(self, method, uri, headers=None, bodyProducer=None):
+ return self._requestWithAuth(method, uri, headers, bodyProducer)
+
+
+ def _requestWithAuth(self, method, uri, headers, bodyProducer):
key = self._authKey(method, uri)
if key in self._challenged:
- return self._respondToChallenge(self._challenged[key], method, uri, headers, bodyProducer)
- d = self._agent.request(method, uri, headers, bodyProducer)
+ d = self._respondToChallenge(self._challenged[key], method, uri, headers, bodyProducer)
+ else:
+ d = self._agent.request(method, uri, headers, bodyProducer)
d.addCallback(self._authenticate, method, uri, headers, bodyProducer)
return d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110118/4635b18e/attachment.html>
More information about the calendarserver-changes
mailing list