X
Tap here to go to the mobile version of the site.

Support Forum

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

Posted

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... :(

Additional System Details

Installed Plug-ins

  • Google Update
  • NVIDIA 3D Vision Streaming plugin for Mozilla browsers
  • NVIDIA 3D Vision plugin for Mozilla browsers
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
  • Next Generation Java Plug-in 10.1.0 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • Shockwave Flash 10.3 r183
  • 4.0.60831.0
  • Plugin for Wacom tablets.
  • NPWLPG
  • Wacom Dynamic Link Library
  • The plug-in allows you to open and edit files using Microsoft Office applications
  • 6.0.12.448
  • RealPlayer(tm) LiveConnect-Enabled Plug-In
  • Office Authorization plug-in for NPAPI browsers
  • np-mswmp

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0

More Information

cor-el
  • Top 10 Contributor
  • Moderator
17585 solutions 159079 answers
See https://developer.mozilla.org/en/WebSockets

Question owner

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... :/

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... :/