WebSocket connection issues

Hi guys,

Just trying to connect to the websocket chat servers (using IRCv3 at the moment on my bot), but the connection drops as soon as the server responds with the HTTP Upgrade response. I’ve checked the websocket echo test service at websocket.org and it works fine.

TCP stream from wireshark:

GET / HTTP/1.1
Host: 192.16.64.45
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: null
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,nb;q=0.6,da;q=0.4
Sec-WebSocket-Key: I2zokA4dE9P2pRlZI9MOlg==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-Protocol: unrealircd

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: 0YeEixSgq2cOgEFi7WG38NOy//g=

Immediately after this it’s TCP FIN messages and the connection closes.

Any ideas?

Katy.

One thing I notice is that the Sec-WebSocket-Protocol that our servers expect is “irc”, so that would be the first thing I’d investigate.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.