Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b041edf32e2702d3474cc3c2e028ce20f12a8059
      
https://github.com/WebKit/WebKit/commit/b041edf32e2702d3474cc3c2e028ce20f12a8059
  Author: Devin Rousso <[email protected]>
  Date:   2026-06-09 (Tue, 09 Jun 2026)

  Changed paths:
    A 
LayoutTests/http/tests/websocket/tests/hybi/inspector/handshake-error-expected.txt
    A LayoutTests/http/tests/websocket/tests/hybi/inspector/handshake-error.html
    M Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
    M Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp

  Log Message:
  -----------
  [curl] Web Inspector: WebSocket response status code and status text are 
missing when handshake fails
https://bugs.webkit.org/show_bug.cgi?id=316313

Reviewed by Abrar Rahman Protyasha and Don Olmstead.

* Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp:
(WebKit::WebSocketTask::validateOpeningHandshake):
Don't just drop the handshake if the server sends an error response as Web 
Inspector needs to be notified.

* Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:
(WebCore::readHTTPVersion): Renamed from `headerHasValidHTTPVersion`.
(WebCore::WebSocketHandshake::readStatusLine):
Move the check for `HTTP/1.1` to only if it's a successful `101` as a valid 
handshake failure could be `HTTP/1.0 404`.

* LayoutTests/http/tests/websocket/tests/hybi/inspector/handshake-error.html: 
Added.
* 
LayoutTests/http/tests/websocket/tests/hybi/inspector/handshake-error-expected.txt:
 Added.

Canonical link: https://commits.webkit.org/314818@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to