-
Notifications
You must be signed in to change notification settings - Fork 265
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Daphne ignores "headers" section from "websocket.accept" message #326
Comments
albertas
changed the title
Daphne ignores headers section from "websocket.accept" message
Daphne ignores "headers" section from "websocket.accept" message
Jul 29, 2020
Hi @albertas. Thanks for the report. Looks like we need to update for the 2.1 version of the websockets spec. Fancy adding handling there? |
Sure, I will try adding "headers" section support myself. However, I don't know what are other changes in 2.1 websocket spec, hence they will be out of my PR scope. |
Hey @albertas: no problem! Getting one thing at a time is plenty (but I think |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to add
permessage_deflate
Websocket extension support fordjango_channels
consumer/server. Server has to provide supported extensions in the headers of handshake response, e.g.Sec-Websocket-Extensions: permessage-deflate
. ASGIREF documentation states, that"headers"
section is supported for"websocket.accept"
message type. Hence, I have tried to accept Websocket connection with this code:However, the daphne server ignores the
"headers"
section of this message and only uses"subprotocol"
section:https://github.com/django/daphne/blob/master/daphne/ws_protocol.py#L185
That means, that Daphne server has no way to inform client, that it supports some kind of Websocket extensions, which is a major limitation.
pip freeze:
The text was updated successfully, but these errors were encountered: