Repository navigation
Web Inspector: Network.setExtraHTTPHeaders does not affect WebSocket - #67097
Merged
Merged
Conversation
Collaborator
|
EWS run on current version of this PR (hash 8ceb66f) Details |
youennf
approved these changes
Jun 18, 2026
https://bugs.webkit.org/show_bug.cgi?id=317001 Reviewed by Youenn Fablet. Test: http/tests/websocket/tests/hybi/inspector/set-extra-http-headers.html * Source/WebCore/Modules/websockets/WebSocketHandshake.h: * Source/WebCore/Modules/websockets/WebSocketHandshake.cpp: (WebCore::isStandardWebSocketHandshakeRequestHeader): Added. (WebCore::WebSocketHandshake::setClientHandshakeRequestHeaders): Added. (WebCore::WebSocketHandshake::clientHandshakeMessage const): (WebCore::WebSocketHandshake::clientHandshakeRequest const): Allow the caller to set additional headers that will be included in the handshake message/request. * Source/WebKit/NetworkProcess/curl/WebSocketTaskCurl.cpp: (WebKit::WebSocketTask::didOpen): * Source/WebKitLegacy/WebCoreSupport/WebSocketChannel.cpp: (WebCore::WebSocketChannel::didOpenSocketStream): Make sure to forward any additional headers. * Source/WebKit/WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::connect): (WebKit::WebSocketChannel::didSendHandshakeRequest): * Source/WebCore/Modules/websockets/WebSocketChannelInspector.h: * Source/WebCore/Modules/websockets/WebSocketChannelInspector.cpp: (WebCore::WebSocketChannelInspector::willSendWebSocketHandshakeRequest const): (WebCore::WebSocketChannelInspector::didSendWebSocketHandshakeRequest const): Added. * Source/WebCore/inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest): (WebCore::InspectorInstrumentation::didSendWebSocketHandshakeRequest): Added. * Source/WebCore/inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl): (WebCore::InspectorInstrumentation::didSendWebSocketHandshakeRequestImpl): Added. * Source/WebCore/inspector/LegacyWebSocketInspectorInstrumentation.h: * Source/WebCore/inspector/LegacyWebSocketInspectorInstrumentation.cpp: (WebCore::LegacyWebSocketInspectorInstrumentation::willSendWebSocketHandshakeRequest): (WebCore::LegacyWebSocketInspectorInstrumentation::didSendWebSocketHandshakeRequest): Added. * Source/WebCore/inspector/agents/InspectorNetworkAgent.h: * Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorNetworkAgent::didSendWebSocketHandshakeRequest): Added. (WebCore::InspectorNetworkAgent::enable): Rename the existing `willSendWebSocketHandshakeRequest` to `didSendWebSocketHandshakeRequest` since it actually instrumented after the request was sent. Add a new `willSendWebSocketHandshakeRequest` that allows Web Inspector to modify the request before it is sent. * LayoutTests/http/tests/websocket/tests/hybi/inspector/echo-headers_wsh.py: Added. * LayoutTests/http/tests/websocket/tests/hybi/inspector/set-extra-http-headers.html: Added. * LayoutTests/http/tests/websocket/tests/hybi/inspector/set-extra-http-headers-expected.txt: Added. Canonical link: https://commits.webkit.org/315465@main
webkit-commit-queue
force-pushed
the
eng/317001
branch
from
June 18, 2026 14:27
8ceb66f to
1e9d5a1
Compare
Collaborator
|
Committed 315465@main (1e9d5a1): https://commits.webkit.org/315465@main Reviewed commits have been landed. Closing PR #67097 and removing active labels. |
dcrousso
added a commit
to dcrousso/playwright
that referenced
this pull request
Aug 4, 2026
…shake request `Network.setExtraHTTPHeaders` and an emulated `locale` now reach the `WebSocket` handshake request, but nothing exercised either from the page or from inside a `Worker` Chromium: - <https://chromium-review.googlesource.com/c/chromium/src/+/7950740> (Network.setExtraHTTPHeaders should affect WebSocket handshake requests) - <https://chromium-review.googlesource.com/c/chromium/src/+/8000530> (Network.setExtraHTTPHeaders should affect WebSocket requests in a Worker) WebKit: - <WebKit/WebKit#67097> (Web Inspector: Network.setExtraHTTPHeaders does not affect WebSocket) Chrome Stable and Edge Stable are both still on 150, which predates that Chromium work, so widen the existing guard to `browserMajorVersion < 151` and reuse it on the new cases Firefox drops the browsing context association when it opens the handshake channel, so the `Worker` cases stay `it.fixme` there until the bundled Firefox picks up <https://phabricator.services.mozilla.com/D310690>
dcrousso
added a commit
to microsoft/playwright
that referenced
this pull request
Aug 4, 2026
…shake request (#42037) `Network.setExtraHTTPHeaders` and an emulated `locale` now reach the `WebSocket` handshake request, but nothing exercised either from the page or from inside a `Worker` Chromium: - <https://chromium-review.googlesource.com/c/chromium/src/+/7950740> (Network.setExtraHTTPHeaders should affect WebSocket handshake requests) - <https://chromium-review.googlesource.com/c/chromium/src/+/8000530> (Network.setExtraHTTPHeaders should affect WebSocket requests in a Worker) WebKit: - <WebKit/WebKit#67097> (Web Inspector: Network.setExtraHTTPHeaders does not affect WebSocket) Chrome Stable and Edge Stable are both still on 150, which predates that Chromium work, so widen the existing guard to `browserMajorVersion < 151` and reuse it on the new cases Firefox drops the browsing context association when it opens the handshake channel, so the `Worker` cases stay `it.fixme` there until the bundled Firefox picks up <https://phabricator.services.mozilla.com/D310690> fixes <#13919> fixes <#28948>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1e9d5a1
8ceb66f