Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tornado: Set an explicit SUPPORTED_METHODS.

Alex Vandiver875622fe578d
diff --git a/zerver/tornado/handlers.py b/zerver/tornado/handlers.py
index a285ac1b22a..c5881a6d722 100644
--- a/zerver/tornado/handlers.py
+++ b/zerver/tornado/handlers.py
@@ -1,6 +1,6 @@
import logging
from contextlib import suppress
-from typing import Any, Dict, List, Optional
+from typing import Any, Collection, Dict, List, Optional
from urllib.parse import unquote
import tornado.web
@@ -83,6 +83,8 @@ def finish_handler(handler_id: int, event_queue_id: str, contents: List[Dict[str
class AsyncDjangoHandler(tornado.web.RequestHandler):
handler_id: int
+ SUPPORTED_METHODS: Collection[str] = {"GET", "HEAD", "POST", "DELETE"} # type: ignore[assignment] # https://github.com/tornadoweb/tornado/pull/3354
+
@override
def initialize(self, django_handler: base.BaseHandler) -> None:
self.django_handler = django_handler