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 ws request subportocol lowercase header #119

Merged
merged 2 commits into from
Jun 24, 2020

Conversation

kids300
Copy link
Contributor

@kids300 kids300 commented May 8, 2020

RFC6445 Sec11.3 specifies several headers like Sec-WebSocket-Protocol. While it does not specifies the key should be case insensitive, many server only accepts case sensitive requests. However http case every key to lowercase for convince. hyper has an issue to solve this problem (hyperium/hyper#1492), but not in http. This is a workaround to make the websocket server happy.

@kids300 kids300 changed the title Fix ws subportocol lowercase header Fix ws request subportocol lowercase header May 8, 2020
Copy link
Member

@daniel-abramov daniel-abramov left a comment

Choose a reason for hiding this comment

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

I'm not against these changes (although I have not heard any server rejecting the connection because of this), but I think we may move them into a function and write a comment about that. @agalakhov , what do you think?

@daniel-abramov
Copy link
Member

@agalakhov , since there were no objections, I'll merge this PR, it does not seem like it can break something, but instead allow more servers to work well with tungstenite.

@daniel-abramov daniel-abramov merged commit 6791dcc into snapview:master Jun 24, 2020
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.

2 participants