[CalendarServer-changes] [7787] CalendarServer/trunk/contrib/performance/httpauth.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Jul 13 15:44:35 PDT 2011


Revision: 7787
          http://trac.macosforge.org/projects/calendarserver/changeset/7787
Author:   exarkun at twistedmatrix.com
Date:     2011-07-13 15:44:34 -0700 (Wed, 13 Jul 2011)
Log Message:
-----------
Force the realm to be "Test Realm" when responding to challenges, since all credentials are created in that realm.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/httpauth.py

Modified: CalendarServer/trunk/contrib/performance/httpauth.py
===================================================================
--- CalendarServer/trunk/contrib/performance/httpauth.py	2011-07-13 21:07:11 UTC (rev 7786)
+++ CalendarServer/trunk/contrib/performance/httpauth.py	2011-07-13 22:44:34 UTC (rev 7787)
@@ -24,6 +24,15 @@
 
 class BasicChallenge(object):
     def __init__(self, realm):
+        # The sim has no real reason to differentiate between credentials by
+        # realm.  It will only ever talk to a single realm.  Since the server
+        # being tested may have a different notion of its realm depending on
+        # various configuration issues, just ignore it and use the realm
+        # encoded in population.py.  It might be nice to someday properly
+        # handle realm values, but presently it would just be an additional
+        # configuration hassle.  See also DigestChallenge.
+        realm = "Test Realm"
+
         self.realm = realm
 
 
@@ -37,6 +46,9 @@
 
 class DigestChallenge(object):
     def __init__(self, realm, **fields):
+        # See the comment in BasicChallenge.
+        realm = "Test Realm"
+
         self.realm = realm
         self.fields = fields
         self.fields['realm'] = realm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110713/1ef50256/attachment.html>


More information about the calendarserver-changes mailing list