Skip to content
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

fix subprotocol for granian #4698

Merged
merged 4 commits into from
Jan 28, 2025
Merged

fix subprotocol for granian #4698

merged 4 commits into from
Jan 28, 2025

Conversation

adhami3310
Copy link
Member

No description provided.

Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still doesn't work for uvicorn in dev mode accessing on chrome

@gi0baro
Copy link

gi0baro commented Jan 28, 2025

FYI, the ASGI protocol specifies you should just use the subprotocol message field, and avoid to have sec-websocket-protocol in headers. ref: https://asgi.readthedocs.io/en/latest/specs/www.html#accept-send-event

@adhami3310
Copy link
Member Author

FYI, the ASGI protocol specifies you should just use the subprotocol message field

Thanks for the link, we were struggling with this a bit. The issue is that Granian/Uviocorn/Gunicorn behave slightly differently in different systems. We couldn't figure out why and how to reproduce it reliably so we opted out for using the header if it's there and subprotocol if it's there.

@masenf masenf merged commit 64fb78a into main Jan 28, 2025
37 checks passed
@masenf masenf deleted the fix-subprotocol-for-granian branch January 28, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants