django / daphne

Django Channels HTTP/WebSocket server
BSD 3-Clause "New" or "Revised" License
2.37k stars 266 forks source link

Use code when rejecting connection #487

Open daveisfera opened 12 months ago

daveisfera commented 12 months ago

Fixed #486

carltongibson commented 12 months ago

Can we add a regression test for this change?

daveisfera commented 11 months ago

I'm not familiar with the tests. Can you point me to where that would be added?

Kludex commented 9 months ago

This PR is wrong. Daphne doesn't support WebSocket Denial Response. The status code 403 is correct.

The message["code"] is not a HTTP status code.

daveisfera commented 9 months ago

This PR is wrong. Daphne doesn't support WebSocket Denial Response. The status code 403 is correct.

The message["code"] is not a HTTP status code.

I'm not sure what that's supposed to mean. I've tested this change and it works