summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-10-22 08:35:55 -0400
committerGitHub <noreply@github.com>2020-10-22 08:35:55 -0400
commit514a240aedd972e6c8b707a7685c3d283f8618c9 (patch)
tree52e476ced593d0cb695c567a6c40afe4151c8c82 /synapse/http
parentDon't 500 for invalid group IDs (#8628) (diff)
downloadsynapse-514a240aedd972e6c8b707a7685c3d283f8618c9.tar.xz
Remove unused OPTIONS handlers. (#8621)
The handling of OPTIONS requests was consolidated in #7534, but the endpoint
specific handlers were not removed.
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/servlet.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/http/servlet.py b/synapse/http/servlet.py
index fd90ba7828..b361b7cbaf 100644
--- a/synapse/http/servlet.py
+++ b/synapse/http/servlet.py
@@ -272,7 +272,6 @@ class RestServlet:
       on_PUT
       on_POST
       on_DELETE
-      on_OPTIONS
 
     Automatically handles turning CodeMessageExceptions thrown by these methods
     into the appropriate HTTP response.
@@ -283,7 +282,7 @@ class RestServlet:
         if hasattr(self, "PATTERNS"):
             patterns = self.PATTERNS
 
-            for method in ("GET", "PUT", "POST", "OPTIONS", "DELETE"):
+            for method in ("GET", "PUT", "POST", "DELETE"):
                 if hasattr(self, "on_%s" % (method,)):
                     servlet_classname = self.__class__.__name__
                     method_handler = getattr(self, "on_%s" % (method,))