搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

What proper headers should I use to succefully end handshake when connecting to WebSocket?

  • 2 个回答
  • 3 人有此问题
  • 12 次查看
  • 最后回复者为 marverix

more options

When I try to use WebSocket, my server on handshake send header like this:

                       $reply = "HTTP/1.1 101 Switching Protocols\r\n" .
                               "Upgrade: websocket\r\n" .
                               "Connection: Upgrade\r\n" .
                               "Sec-WebSocket-Accept: {$accept}\r\n\r\n";

But, FF doesn't really ends/accept (?) it... It just wainting, and after few sec it disconnect. In Chrome browser it works perfectly... :(

When I try to use WebSocket, my server on handshake send header like this: $reply = "HTTP/1.1 101 Switching Protocols\r\n" . "Upgrade: websocket\r\n" . "Connection: Upgrade\r\n" . "Sec-WebSocket-Accept: {$accept}\r\n\r\n"; But, FF doesn't really ends/accept (?) it... It just wainting, and after few sec it disconnect. In Chrome browser it works perfectly... :(

所有回复 (2)

more options

I realy REALY searched whole internet and I saw this page a lot of times and I have read RFC6455 milion times! Everything is 100% ok!... In Chrome it works just perfect, but in my favorite browser - FF <3 - no... :/