The WebSocket spec restricts the value of the subprotocol that the client is allowed to send to the server (see step 3 in the WebSocket() constructor algorithm). However there's no restriction on the server side (see step 2 of Sending the server's opening handshake). The client could not have asked for any subprotocol, but the server can still respond with a subprotocol, and the connection will be accepted.

Shouldn't the server have the same restriction as the client?

--
Simon Pieters
Opera Software

Reply via email to