Client Need to ignore the Reason-Phrase(Switching Protocols) and operate solely on the Status-Code
airshiplay opened this issue · 1 comments
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
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?