[CalendarServer-changes] [2826] CalendarServer/trunk/twistedcaldav/resource.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 14 12:54:56 PDT 2008


Revision: 2826
          http://trac.macosforge.org/projects/calendarserver/changeset/2826
Author:   wsanchez at apple.com
Date:     2008-08-14 12:54:55 -0700 (Thu, 14 Aug 2008)
Log Message:
-----------
Handle no user agent case

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/resource.py

Modified: CalendarServer/trunk/twistedcaldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/resource.py	2008-08-14 19:51:25 UTC (rev 2825)
+++ CalendarServer/trunk/twistedcaldav/resource.py	2008-08-14 19:54:55 UTC (rev 2826)
@@ -152,13 +152,14 @@
             # Filter out unsupported clients
             #
             agent = request.headers.getHeader("user-agent")
-            for reject in config.RejectClients:
-                if reject.search(agent) is not None:
-                    self.log_info("Rejecting user-agent: %s" % (agent,))
-                    raise HTTPError(StatusResponse(
-                        responsecode.FORBIDDEN,
-                        "Your client software (%s) is not allowed to access this service." % (agent,)
-                    ))
+            if agent:
+                for reject in config.RejectClients:
+                    if reject.search(agent) is not None:
+                        self.log_info("Rejecting user-agent: %s" % (agent,))
+                        raise HTTPError(StatusResponse(
+                            responsecode.FORBIDDEN,
+                            "Your client software (%s) is not allowed to access this service." % (agent,)
+                        ))
 
         response = maybeDeferred(super(CalDAVResource, self).renderHTTP, request)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080814/42d3a269/attachment-0001.html 


More information about the calendarserver-changes mailing list