Просмотр исходного кода

Always allow OPTIONS requests (fixes #780)

Guillaume Ayoub 14 лет назад
Родитель
Сommit
a9c74ae84d
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      radicale/__init__.py

+ 2 - 2
radicale/__init__.py

@@ -197,8 +197,8 @@ class Application(object):
         function = getattr(self, environ["REQUEST_METHOD"].lower())
 
         # Check rights
-        if not items or not self.acl:
-            # No collection or no acl, don't check rights
+        if not items or not self.acl or function == self.options:
+            # No collection, or no acl, or OPTIONS request: don't check rights
             status, headers, answer = function(environ, items, content, None)
         else:
             # Ask authentication backend to check rights