我正在使用libwebsockets,websocket可以正常使用Chrome,但是在Safari中失败了。 看起来在Safari上,建立连接永远不会发生。 查看标题信息,Safari似乎缺失了很多。
Safari发送的标题:
Origin: http://99.36.180.46
Sec-WebSocket-Key1: " W1278r88f939
Connection: Upgrade
Host: 99.36.180.46
Sec-WebSocket-Key2: 3"3Q534h 8 042 B4
Upgrade: WebSocket
Sec-WebSocket-Protocol:: trace-protocol
Chrome发送的标题:
* Pragma: no-cache
* Origin: http://99.36.180.46
* Host: 99.36.180.46
* Sec-WebSocket-Key: dh5lUy8LU/LXX/zi/h91FQ==
* User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
* Upgrade: websocket
* Sec-WebSocket-Extensions: x-webkit-deflate-frame Cache-Control: no-cache
* Sec-WebSocket-Protocol: trace-protocol
* Connection: Upgrade
* Sec-WebSocket-Version: 13
任何指导都将不胜感激。