WebSocket-Node
WebSocket-Node copied to clipboard
Closing Frame Without Status Code Interpreted As Abnormal
When I send a closing frame without a status code ie 0x8800 (masked or unmasked), the close callback returns 1006 while underneath it responds to the connection with 1000. Perhaps 1005 and 1006 were mixed up?
RFC6455 Section 7.4.1
1005 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. It is designated for use in applications expecting a status code to indicate that no status code was actually present.
1006 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. It is designated for use in applications expecting a status code to indicate that the connection was closed abnormally, e.g., without sending or receiving a Close control frame.
npm websocket
: v2.15.11
node
: v4.7.3