Community
Participate
Working Groups
Build Identifier: M20100211-1343 Current way of processing length of binary data in WebSocket frame is somehow doesn't match the WebSocket specification at http://www.whatwg.org/specs/web-socket-protocol/, which, I believe, is the latest version of this specification. In the section of Data framing (for server and for client) it states, that length of the binary data in the frame should be represented as 64-bit unsigned integer, meaning that after frame byte(0xFF) and the data itself should be 8-bytes, representing length of the sending data. In current WebSocket implementation methods WebSocketConnection.sendMessage(frame, data[]) or WebSocketConnection.sendMessage(frame, data[], offset, length) and underlying methods in sending frame is not represented by 8 bytes, but represented only by amount of bytes required for holding the length value. Eg: sending message 5 bytes of data 45 46 47 48 49 should send: ff 00 00 00 00 00 00 00 05 45 46 47 48 49 will send: ff 05 45 46 47 48 49 I just made my own implementation of WebSocket client based on the latest specification of the protocol at http://www.whatwg.org/specs/web-socket-protocol/ and just found this inconsistency issue. I believe this issue with handling length as 8 byte value also present in the receiving methods. Please, fix this issue in sake of faster development of this great and very promising web protocol. Many thanks. Reproducible: Always Steps to Reproduce: 1.Connect any WebSocket client to the WebSocket servlet 2.Use any packet sniffer while sending some data using functions WebSocketConnection.sendMessage(frame, data[]) or WebSocketConnection.sendMessage(frame, data[], offset, length) to see sending data frame.
Ah politics! That version is not the IETF draft and there is no consensus around the changes made in that version (nor any rigour about when they are made). For a view into the politics see: http://www.ietf.org/mail-archive/web/hybi/current/threads.html#03136 That discussion and similar issues has ultimately resulted in a change of editor for the IETF draft: http://www.ietf.org/mail-archive/web/hybi/current/threads.html#03198 Jetty will be following the IETF drafts as they are correctly submitted and will be viewable at https://datatracker.ietf.org/doc/draft-ietf-hybi-thewebsocketprotocol/
Resolved -> Closed