Bug 245774 - [GTK][WPE] Wrong close status code returned when the client closes a WebSocket
Summary: [GTK][WPE] Wrong close status code returned when the client closes a WebSocket
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Miguel Gomez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-28 03:00 PDT by Miguel Gomez
Modified: 2022-09-29 01:32 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Gomez 2022-09-28 03:00:57 PDT
This can reproduced with https://certification.bbctvapps.co.uk/act/test/networking/v1.3.1/websocket-client-initiated-closure/

When the WebSocket connection is closed, we return the close code provided by soup_websocket_connection_get_close_code(). But this value can be 0, which is an invalid return code, if the client abruptly closes the connection. We should return SOUP_WEBSOCKET_CLOSE_ABNORMAL in this case.
Comment 1 Miguel Gomez 2022-09-28 03:10:58 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4787
Comment 2 EWS 2022-09-29 01:32:10 PDT
Committed 254988@main (977e507ed577): <https://commits.webkit.org/254988@main>

Reviewed commits have been landed. Closing PR #4787 and removing active labels.