我在libevent中实现了一个WebSocket服务器,虽然在Chrome和Firefox中没有任何问题,但在IE10中我甚至无法建立连接。
以下是握手过程:
IE10 Request:
GET /echo HTTP/1.1
Origin: 95.115.195.4
Sec-WebSocket-Key: rgPWUlUtk+h3CPWqk99OtA==
Connection: Upgrade
Upgrade: Websocket
Sec-WebSocket-Version: 8
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)
Host: 95.115.195.4:5555
Cache-Control: no-cache
Server Response:
HTTP/1.1 101 Switching Protocols
Upgrade: Websocket
Connection: Upgrade
Sec-WebSocket-Accept: jGmgQ/jOvew8MU9o3bbqPG9PHlY=
Sec-WebSocket-Protocol: chat
IE10调试器显示: SCRIPT12152:WebSocket错误:HTTP响应不正确。状态码101 有人知道我做错了什么吗? 谢谢