[CalendarServer-changes] [3953] CalendarServer/trunk/calendarserver/provision

source_changes at macosforge.org source_changes at macosforge.org
Fri Apr 3 14:56:58 PDT 2009


Revision: 3953
          http://trac.macosforge.org/projects/calendarserver/changeset/3953
Author:   cdaboo at apple.com
Date:     2009-04-03 14:56:56 -0700 (Fri, 03 Apr 2009)
Log Message:
-----------
Make sure SACL requests return data from the PROPFIND cache. This also fixes a problem where zero quota value would
cause an exception.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/provision/root.py
    CalendarServer/trunk/calendarserver/provision/test/test_root.py

Modified: CalendarServer/trunk/calendarserver/provision/root.py
===================================================================
--- CalendarServer/trunk/calendarserver/provision/root.py	2009-04-03 21:07:32 UTC (rev 3952)
+++ CalendarServer/trunk/calendarserver/provision/root.py	2009-04-03 21:56:56 UTC (rev 3953)
@@ -196,8 +196,6 @@
 
         elif self.useSacls and not hasattr(request, "checkedSACL") and not hasattr(request, "checkingSACL"):
             yield self.checkSacl(request)
-            child = (yield super(RootResource, self).locateChild(request, segments))
-            returnValue(child)
 
         if config.RejectClients:
             #

Modified: CalendarServer/trunk/calendarserver/provision/test/test_root.py
===================================================================
--- CalendarServer/trunk/calendarserver/provision/test/test_root.py	2009-04-03 21:07:32 UTC (rev 3952)
+++ CalendarServer/trunk/calendarserver/provision/test/test_root.py	2009-04-03 21:56:56 UTC (rev 3953)
@@ -253,10 +253,11 @@
         def __init__(self):
             self.cache = {}
             self.responseCache = self
-    
+            self.cacheHitCount = 0
 
         def getResponseForRequest(self, request):
             if str(request) in self.cache:
+                self.cacheHitCount += 1
                 return self.cache[str(request)]
     
     
@@ -314,6 +315,7 @@
         def gotResponse2(response):
             if response.code != responsecode.MULTI_STATUS:
                 self.fail("Incorrect response for PROPFIND /principals/: %s" % (response.code,))
+            self.assertEqual(self.root.resource.responseCache.cacheHitCount, 1)
 
         d = self.send(request, gotResponse1)
         return d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090403/d39f43b1/attachment.html>


More information about the calendarserver-changes mailing list