Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] Websocket: handling of close message frame without status #6260

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

kozlovic
Copy link
Member

The server was incorrectly sending back a close message frame with status 1005 when not receiving a status in the close message frame from the client. This was wrong. This status was to be used internally to keep track that no status was received and therefore the server should not send a status back.

Also, the server was sending status 1006 in some error conditions, while the spec also states that this status must not be used to set the status, instead it was to internally keep track that there was an error condition.

Resolves #6259

Signed-off-by: Ivan Kozlovic ivan@synadia.com

The server was incorrectly sending back a close message frame with
status 1005 when not receiving a status in the close message frame
from the client. This was wrong. This status was to be used internally
to keep track that no status was received and therefore the server
should not send a status back.

Also, the server was sending status 1006 in some error conditions,
while the spec also states that this status must not be used to
set the status, instead it was to internally keep track that there
was an error condition.

Resolves #6259

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic kozlovic requested a review from a team as a code owner December 14, 2024 00:18
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison derekcollison merged commit 3646ef9 into main Dec 14, 2024
5 checks passed
@derekcollison derekcollison deleted the ws_close branch December 14, 2024 00:35
@aricart
Copy link
Member

aricart commented Dec 14, 2024

Thank you @kozlovic

neilalexander added a commit that referenced this pull request Dec 16, 2024
Includes the following:

- #6260
- #6249
- #6264
- #6265
- #6266

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Websocket: Server incorrectly sends close message status 1005 or 1006
3 participants