Just a question about autobahn server testcase 7.3.1
Send a close frame with payload length 0 (no close code, no close reason)
Clean close with normal code.
Should the response status also contain no close code, no close reason?
Or is the status code 1000 (normal) the way the spec wants?
Reading the spec at
" If there is a body, the first two
bytes of the body MUST be a 2-byte unsigned integer (in network byte
order) representing a status code with value /code/ defined in
Section 7.4. "
That tells me that receiving a frame with no status code is acceptable.
And then section
" If this Close control frame contains no status code, _The WebSocket
Connection Close Code_ is considered to be 1005. "
So internally in our server impl we take the lack of status code in the close frame to mean 1005 internally (no status code specified), treating the incoming frame as having no status code , then we respond with status code 1000 and no reason indicating a normal close.
However a point was raised that if the close frame has no status or message then the response should also contain no status and message.
Is this the behavior?
Or is responding with status code 1000 and no message the appropriate way?
 This is treated differently than if we receive a code 1005 from the endpoint as per autobahn server testcase 7.9.4