daphne
daphne copied to clipboard
Implement WebSocket Denial Response extension
The value for code is hard coded to 403 when close happens while connecting
Daphne doesn't implement this: https://asgi.readthedocs.io/en/latest/extensions.html#websocket-denial-response.
Daphne doesn't implement this: https://asgi.readthedocs.io/en/latest/extensions.html#websocket-denial-response.
I'm not sure what this is supposed to mean. The description sounds like it works and I've tested the change in the linked PR and it works
OK, thanks for looking at it @Kludex.
@daveisfera I'm not sure what the problem here really is, or why/how the PR resolves it. Also there's no tests.
I think to progress it would help to step back and explain what the issue is. Then we can think about the appropriate response.
(Sorry if that seems a pain, but I'm slow sometimes, and I like to understand an issue before just merging a proposal. Thanks.)
The OP wants to send a different status code if the connection is rejected. It can only be done with the WebSocket Denial Response extension.
Ok, so I can have a read.
@daveisfera fancy doing a fuller job here?
If reference is needed, both Uvicorn and Hypercorn implement the extension.
Honestly, I've moved onto a different approach, so if you're not interested in resolving this issue, then you can just close this
Ok, thanks for the input. I'll have a read about the extension anyhow.
Duplicate of #389.