google chrome - socket.close() sends malformed packet -


When I close the browser window, I get this off-packet (which considers the VirarShork and libwebockets)

  WebSocket 1 ... .... = Fin: True .000 .... = Reserved: 0x00 .... 1000 = Opcode: Close connection (8) 0 .... ... = Mask: false .000 0010 = payload length: 2 close payload: 03e9 Close: going away (1001)  

When I socket.close ( ); (under the latest Chrome Windows) I get this packet which neither understands Wireless nor libwebockets.

  WebSocket 1 ... .... = Fin: True .000 .... = Reserved: 0x00 ... 1000 = Opcode: Close connection (8) 1 ... .... = Mask: true .000 0000 = payload length: 0 masking-key: close 1e45aadf payload: & lt; Missing & gt; Unmask Payload [Disksector Bug, Protocol WebSocket: TVBuff: 699: Unfair Claim "DISSECTOR_ASSERT_NOT_REACHED"]  

Technically, nothing really is wrong.

On the closed frame, a body (frame of "application data" part) indicates a reason for shutting down , such as Closing the end point, one end of the end point one frame is too large, or a frame obtaining a finishing point that does not conform to the expected format by the endpoint. If there is a body, then the first two bytes of the body should represent a status code with the value / code / definition defined in Section 7.4 in the 2-byte unsigned integer (in a network byte order). After 2-byte integer ...

Therefore Google Chrome is sending a one-stop frame with no reason, and it is legal.

So it's not wrong, it's weird. This is strange because it is a masked frame in which there is no payload, it can set the mask bit, and 4 bytes for the mask key is also strange because in it socket.close () is done, but it does not stop when the browser is closed, though it is legal.

I think it's okay a behavior in Google Chrome is incompatible, but still, it should be handled correctly in Libwebokk and Wahark, because it complies with the specification.


Comments

Popular posts from this blog

Active Directory Authenticated Proxy Server with Squid or CNTLM -

java - @PluginTarget(Node.class) not registering as neo4j plugin -

python - Calculate STD manually using Groupby Pandas DataFrame -