gourykr / phpwebsocket

Automatically exported from code.google.com/p/phpwebsocket
0 stars 0 forks source link

Connects, but immediately disconnects #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Run the demo as documented:
1. Run 'php -q server.php' on the back end
2. Load 'client.html' into the front end. 

What is the expected output? What do you see instead?

Expecting the Demo to run

Instead, when I run 'client.html', I get the following:

WebSocket - status 0
Disconnected - status 3

What version of the product are you using? On what operating system?

- 5.3.5-1ubuntu7.2 (Ubuntu Natty)
- Chrome 13.0.782.215 (Windows 7 x64)

Please provide any additional information below.

I get the Disconnected - status 3 message about a second or two after the 
initial status 0 message.

Original issue reported on code.google.com by mpea...@gmail.com on 26 Aug 2011 at 2:11

GoogleCodeExporter commented 8 years ago
Maybe because of lack of support of the newer hybi specifications. See 
http://code.google.com/p/phpwebsocket/issues/detail?id=35 as well.

Original comment by ch...@tanaskoski.com on 27 Aug 2011 at 7:55

GoogleCodeExporter commented 8 years ago
To fix this replace this :
preg_match ("#Sec-WebSocket-Origin: (.*?)\r\n#", $buffer, $match) && $origin = 
$match[1];
with
preg_match ("#Origin: (.*?)\r\n#", $buffer, $match) && $origin = $match[1];

Original comment by stokesc...@gmail.com on 30 Jun 2012 at 5:49

GoogleCodeExporter commented 8 years ago
sadfsadf

Original comment by lts06...@gmail.com on 26 Jun 2015 at 3:47