[Triage] Rejecting WebSocket does not conform to the ASGI spec #3733
vytas7
started this conversation in
Issue Triage
Replies: 1 comment
|
A correction, that 200 may have been invented by Firefox's inspector. It looks like Gunicorn just sends a bare |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Type
Bug Report
Description
According to the ASGI spec, when a
closeevent is sent before the WebSocket is accepted, the server must close the connection with an HTTP 403 error code (Forbidden).Gunicorn does not conform to this part of spec; instead it replies with an
HTTP 200 OK, and then abruptly cuts the connection.This works correctly in all other ASGI servers exercised in Falcon's integration tests: Daphne, Granian, Hypercorn, and Uvicorn.
Steps to Reproduce (for bugs)
reject.py:gunicorn26.2.0 (see below).Configuration
Logs / Error Output
Nothing of interest. The request doesn't even show up in the log.
Gunicorn Version
gunicorn (version 26.2.0)
Python Version
Python 3.12.3
Worker Class
asgi (beta)
Operating System
Ubuntu 24.04.4 LTS
Additional Context
No response
Checklist
All reactions