[z3-checkins] r5873 - z3/Flon/trunk

dreamcatcher at codespeak.net dreamcatcher at codespeak.net
Thu Aug 5 00:34:43 MEST 2004


Author: dreamcatcher
Date: Thu Aug  5 00:34:42 2004
New Revision: 5873

Modified:
   z3/Flon/trunk/browser.py
Log:
Handle WebDAV requests gracefully

Modified: z3/Flon/trunk/browser.py
==============================================================================
--- z3/Flon/trunk/browser.py	(original)
+++ z3/Flon/trunk/browser.py	Thu Aug  5 00:34:42 2004
@@ -44,6 +44,12 @@
 class BrowserDefault(BaseDefault):
 
     def defaultView(self, request):
+        context = self.context
+        # Try to detect if it's a WebDAV request, and if
+        # so, return immediately.
+        if request and request.has_key('REQUEST_METHOD'):
+            if request['REQUEST_METHOD'] not in  ['GET', 'HEAD', 'POST']:
+                return context, [request['REQUEST_METHOD']]
         context, path = super(BrowserDefault, self).defaultView(request)
         if path and len(path) == 1:
             # Try to lookup a view with the name


More information about the z3-checkins mailing list