GulDmitry/php-websocket-server — Issue #1: Message from server to client must not be masked
Author: gimite
Created: 2011-10-29 04:38:49+00:00
State: open

Hello,

It seems php-websocket-server applies masking to messages from server to client in hybi-10. The protocol says that it must not be masked:
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-4.1

> Frames sent from the server to the client are not masked.

I'm author of web-socket-js (Flash fallback implementation) and I got report that it doesn't work with php-websocket-server:
https://github.com/gimite/web-socket-js/issues/102
This is because web-socket-js doesn't support masked message from server.

Chrome and Firefox accepts masked message because it was ambiguous whether masking is allowed in past spec, but they may disallow masking in future version.

Note that message from client to server *must* be masked.