websockify-other
websockify-other copied to clipboard
echo back requested Sec-Websocket-Protocol header for better browser …
trafficstars
…compatibility.
background
The novnc web version we are using will construct websocket object with protocol argument, which will result in the request sent by browser contains a Sec-Websocket-Protocol. The golang implement won't bring it back in response header, then some browsers(chrome especially) will judge that the websocket server doesn't support the requested websocket subprotocols, and furthur close the connection.
Thank you for your contribution. There appears to be some unrelated changes in this commit as well?