sitegui / nodejs-websocket

A node.js module for websocket server and client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received

padarom opened this issue · comments

I'm trying to build a WebSocket server implementation of Guacamole, which sends the following headers:

  headers:
   { host: 'localhost:8889',
     connection: 'Upgrade',
     pragma: 'no-cache',
     'cache-control': 'no-cache',
     upgrade: 'websocket',
     origin: 'http://localhost:8000',
     'sec-websocket-version': '13',
     'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36',
     'accept-encoding': 'gzip, deflate, sdch',
     'accept-language': 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4',
     'sec-websocket-key': 'ipg7rRB525W3Cv67MY5x0g==',
     'sec-websocket-extensions': 'permessage-deflate; client_max_window_bits',
     'sec-websocket-protocol': 'guacamole' },

The handshake response from the server should then contain

Sec-WebSocket-Protocol: guacamole

However it doesn't, thus resulting in this error.

I have found a mention of this error in #24, but it was closed as the original author didn't reply.

Discussion moved to #24