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

Client Need to ignore the Reason-Phrase(Switching Protocols) and operate solely on the Status-Code #8

Closed
airshiplay opened this issue Apr 27, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@airshiplay
Copy link

Client Need to ignore the Reason-Phrase(Switching Protocols) and operate solely on the Status-Code

Different websocket servers respond differently to HTTP upgrades

GET /ws?device=1&devid=dev&description=My%20Device%20Description&keepalive=5 HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: rb8NoBZ9hyKyBDez/VLqOQ==
Sec-WebSocket-Version: 13
Host: 172.19.12.71:5912

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: 5ZGFlM/1c+0u8ebA/aKdbGDGXCw=

GET /ws?device=1&devid=dev&description=My%20Device%20Description&keepalive=5 HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: r/Yb4H5NKtECyumcRl4/hQ==
Sec-WebSocket-Version: 13
Host: 172.19.12.71:8080

HTTP/1.1 101
Upgrade: websocket
Connection: upgrade
Sec-WebSocket-Accept: BP2DC5lXawTktU4OTmiVuGB5FCI=
Date: Fri, 26 Apr 2019 03:02:44 GMT

@zhaojh329
Copy link
Owner

https://tools.ietf.org/html/rfc7230#section-3.1.2
A client SHOULD ignore the reason-phrase content.

Thank you for discovering this problem.
Can you make a PR to fix it?

@zhaojh329 zhaojh329 added the bug Something isn't working label Apr 28, 2019
zhaojh329 pushed a commit that referenced this issue May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants