kerryjiang / SuperWebSocket

SuperWebSocket is a .NET implementation of WebSocket server.
Apache License 2.0
505 stars 194 forks source link

Failed to parse handshake! #35

Open sushilksharma opened 8 years ago

sushilksharma commented 8 years ago

I am getting this error logged in SuperWebSocket err log file, when client connects to the server developed using SuperWebSocket. But it seems the upgrade request send by client during websocket handshake is fine.

I added some trace logs in SuperWebSocket and it seems GET and HTTP/1.1 is coming in two different lines during the ReadLine call on StringReader , resulting in ParseHandshake throwing exception.

But when same header is printed by Logger, upgrade request seems to be fine.

GET / HTTP/1.1 Pragma: no-cache Cache-Control: no-cache Host: accesscomeserver.qa.mymaxprocloud.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: RMK4qLOdY/JVzCP1CDbaJg== Origin: http://accesscomeserver.qa.mymaxprocloud.com Sec-WebSocket-Protocol: honeywell.isom.http Sec-WebSocket-Extensions: Sec-WebSocket-Version: 13 X-HON-ISOM-Authorization: Basic MDA0MDg0MjE2MzkwOjAwNDA4NDIxNjM5MA== Authorization: Basic MDA0MDg0MjE2MzkwOmJDV040V2dPYkFTcXUydTI=