You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
updated the websocket program to use the current websocket specification used
by firefox and chrome. should be compliant up to version
17(http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17)
likely still needs some work
Original issue reported on code.google.com by tuser...@gmail.com on 6 Feb 2012 at 6:43
I believe you're calculating the payload lengths incorrectly with the 16 bit
and 64 bit values.
For example:
$length=ord($msg[$index])+ord($msg[$index+1])
You're summing the two byte values together there, instead of considering them
as one 16 bit number. I'm pretty sure it should be something like:
$length = (ord($msg[$index]) << 8) | ord($msg[$index + 1]); // shifts 8 bits
left and adds the second byte
In addition at the line:
return $payload.processMsg(substr($msg,$index));
I think you meant calling the function recursively, thus the correct function
name would be unwrap(), or then I missed the other function :).
Original comment by terho.si...@gmail.com on 6 Apr 2012 at 1:24
Original issue reported on code.google.com by
tuser...@gmail.com
on 6 Feb 2012 at 6:43Attachments:
The text was updated successfully, but these errors were encountered: