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

Additions to WebSocket closing codes from IANA specification #5204

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

cjavad
Copy link
Contributor

@cjavad cjavad commented Nov 28, 2023

Since RFC6455 3 additional closing codes have been added to the specification. Added CLOSE_SERVICE_RESTART, CLOSE_TRY_AGAIN_LATER, CLOSE_BAD_GATEWAY as valid close reasons for the websocket protocol.

The official websocket specification document describes the missing protocol closing codes seen here: https://www.iana.org/assignments/websocket/websocket.txt

Furthermore they are supported by large implementations already square/okhttp#5276.

Further references can be found here https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code

The name of CLOSE_BAD_GATEWAY is derrived from both the original longer description and the one commonly used by the mozilla docs.

@cjavad cjavad changed the title closing codes have been added to the IANA … Additions to WebSocket closing codes from IANA specification Nov 28, 2023
…specification. Added CLOSE_SERVICE_RESTART, CLOSE_TRY_AGAIN_LATER, CLOSE_BAD_GATEWAY as valid close reasons for the websocket protocol.
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b902f1b) 72.98% compared to head (f44d5b5) 72.96%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5204      +/-   ##
==========================================
- Coverage   72.98%   72.96%   -0.03%     
==========================================
  Files          69       69              
  Lines       14855    14855              
==========================================
- Hits        10842    10839       -3     
- Misses       4013     4016       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matyhtf matyhtf merged commit 2457f79 into swoole:master Dec 8, 2023
33 of 36 checks passed
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.

2 participants