mirror of https://github.com/zulip/zulip.git
tornado: Stop supporting HEAD requests.
These are not part of the API, and lead to moderately confusing behaviour -- they block (or not) requested, but of course send no actual data in the body.
This commit is contained in:
parent
875622fe57
commit
8eccb3af20
|
@ -83,7 +83,7 @@ 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
|
||||
SUPPORTED_METHODS: Collection[str] = {"GET", "POST", "DELETE"} # type: ignore[assignment] # https://github.com/tornadoweb/tornado/pull/3354
|
||||
|
||||
@override
|
||||
def initialize(self, django_handler: base.BaseHandler) -> None:
|
||||
|
@ -197,10 +197,6 @@ class AsyncDjangoHandler(tornado.web.RequestHandler):
|
|||
# connections.
|
||||
await sync_to_async(response.close, thread_sensitive=True)()
|
||||
|
||||
@override
|
||||
async def head(self, *args: Any, **kwargs: Any) -> None:
|
||||
await self.get(*args, **kwargs)
|
||||
|
||||
@override
|
||||
async def post(self, *args: Any, **kwargs: Any) -> None:
|
||||
await self.get(*args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue