Skip to content

test(proxy): cover CONNECT 407 with socket-close reconnection#40866

Open
yury-s wants to merge 2 commits into
microsoft:mainfrom
yury-s:fix-40768
Open

test(proxy): cover CONNECT 407 with socket-close reconnection#40866
yury-s wants to merge 2 commits into
microsoft:mainfrom
yury-s:fix-40768

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented May 15, 2026

Summary

  • Adds a regression test for the WebKit/libcurl proxy auth hang where a proxy responds to CONNECT with 407 and immediately destroys the socket.

Fixes #40768

yury-s added 2 commits May 15, 2026 14:29
Regression test for microsoft#40768:
some HTTP proxies respond to CONNECT with 407 and immediately destroy
the socket, expecting the client to reopen a TCP connection and resend
CONNECT with Proxy-Authorization. WebKit on Windows (libcurl) was
hanging in this scenario.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@yury-s yury-s added the CQ1 label May 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [chromium] › mcp/http.spec.ts:103 › http transport browser lifecycle (isolated) @mcp-ubuntu-latest-chromium

7098 passed, 1104 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

3 flaky ⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [firefox-library] › library/browsertype-connect.spec.ts:792 › launchServer › should upload a folder `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-library] › library/browsertype-connect.spec.ts:792 › launchServer › should upload a folder `@webkit-ubuntu-22.04-node20`

41501 passed, 842 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests others"

18 flaky ⚠️ [electron-page] › page/page-localstorage.spec.ts:49 › localStorage.removeItem removes a single item `@electron-ubuntu-latest`
⚠️ [electron-page] › page/page-navigation.spec.ts:28 › should work with cross-process _blank target `@electron-ubuntu-latest`
⚠️ [electron-page] › page/page-navigation.spec.ts:36 › should work with _blank target in form `@electron-ubuntu-latest`
⚠️ [electron-page] › page/page-request-continue.spec.ts:398 › should respect set-cookie in redirect response `@electron-ubuntu-latest`
⚠️ [electron-page] › page/page-route.spec.ts:74 › should not support ? in glob pattern `@electron-ubuntu-latest`
⚠️ [electron-page] › page/page-route.spec.ts:169 › should not override cookie header `@electron-ubuntu-latest`
⚠️ [electron-page] › page/page-localstorage.spec.ts:49 › localStorage.removeItem removes a single item `@electron-macos-latest`
⚠️ [electron-page] › page/page-navigation.spec.ts:28 › should work with cross-process _blank target `@electron-macos-latest`
⚠️ [electron-page] › page/page-navigation.spec.ts:36 › should work with _blank target in form `@electron-macos-latest`
⚠️ [electron-page] › page/page-request-continue.spec.ts:398 › should respect set-cookie in redirect response `@electron-macos-latest`
⚠️ [electron-page] › page/page-route.spec.ts:74 › should not support ? in glob pattern `@electron-macos-latest`
⚠️ [electron-page] › page/page-route.spec.ts:169 › should not override cookie header `@electron-macos-latest`
⚠️ [electron-page] › page/page-localstorage.spec.ts:49 › localStorage.removeItem removes a single item `@electron-windows-latest`
⚠️ [electron-page] › page/page-navigation.spec.ts:28 › should work with cross-process _blank target `@electron-windows-latest`
⚠️ [electron-page] › page/page-navigation.spec.ts:36 › should work with _blank target in form `@electron-windows-latest`
⚠️ [electron-page] › page/page-request-continue.spec.ts:398 › should respect set-cookie in redirect response `@electron-windows-latest`
⚠️ [electron-page] › page/page-route.spec.ts:74 › should not support ? in glob pattern `@electron-windows-latest`
⚠️ [electron-page] › page/page-route.spec.ts:169 › should not override cookie header `@electron-windows-latest`

19792 passed, 658 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 2"

3 fatal errors, not part of any test
36 failed
❌ [chromium-library] › library/video.spec.ts:275 › screencast › should capture navigation @chromium-tip-of-tree-ubuntu-22.04--headed
❌ [firefox-library] › library/screencast.spec.ts:28 › screencast.start delivers frames via onFrame callback @firefox-headed-macos-15-xlarge
❌ [firefox-page] › page/page-emulate-media.spec.ts:196 › should report hover and fine pointer for desktop @firefox-beta-ubuntu-22.04
❌ [firefox-page] › page/page-network-response.spec.ts:67 › should return uncompressed text for brotli encoding @firefox-beta-ubuntu-22.04
❌ [firefox-library] › library/capabilities.spec.ts:105 › should support webgl @smoke @firefox-beta-windows-latest
❌ [firefox-page] › page/page-network-response.spec.ts:67 › should return uncompressed text for brotli encoding @firefox-beta-windows-latest
❌ [firefox-page] › page/page-screenshot.spec.ts:321 › page screenshot › should work for webgl @firefox-beta-windows-latest
❌ [firefox-library] › library/browsercontext-reuse.spec.ts:339 › reuse connect › should continue issuing events after closing the reused page @firefox-macos-26-large
❌ [firefox-library] › library/browsercontext-reuse.spec.ts:361 › reuse connect › should work with routeWebSocket @firefox-macos-26-large
❌ [firefox-library] › library/browsercontext-reuse.spec.ts:412 › reuse connect › should update viewport and media @firefox-macos-26-large
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:113 › should restore state from userDataDir @firefox-macos-26-large
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:140 › should create userDataDir if it does not exist @firefox-macos-26-large
❌ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:161 › should have passed URL when launching with ignoreDefaultArgs: true @firefox-macos-26-large
❌ [firefox-library] › library/proxy.spec.ts:228 › should exclude patterns @firefox-macos-26-large
❌ [firefox-library] › library/capabilities.spec.ts:105 › should support webgl @smoke @firefox-beta-macos-latest
❌ [firefox-library] › library/capabilities.spec.ts:113 › should support webgl 2 @smoke @firefox-beta-macos-latest
❌ [firefox-page] › page/page-network-response.spec.ts:67 › should return uncompressed text for brotli encoding @firefox-beta-macos-latest
❌ [firefox-page] › page/page-screenshot.spec.ts:321 › page screenshot › should work for webgl @firefox-beta-macos-latest
❌ [webkit-library] › library/browsertype-connect.spec.ts:267 › run-server › should send default User-Agent and X-Playwright-Browser headers with connect request @webkit-macos-26-large
❌ [webkit-library] › library/inspector/cli-codegen-2.spec.ts:105 › cli codegen › should upload a single file @webkit-macos-26-large
❌ [webkit-library] › library/proxy.spec.ts:167 › should reconnect with credentials after CONNECT 407 closes the socket @webkit-headed-windows-latest
❌ [webkit-library] › library/inspector/cli-codegen-2.spec.ts:105 › cli codegen › should upload a single file @webkit-windows-latest
❌ [webkit-library] › library/proxy.spec.ts:167 › should reconnect with credentials after CONNECT 407 closes the socket @webkit-windows-latest
❌ [webkit-library] › library/debug-controller.spec.ts:270 › should highlight inside iframe @webkit-macos-26-xlarge
❌ [webkit-library] › library/debug-controller.spec.ts:296 › should highlight aria template @webkit-macos-26-xlarge
❌ [webkit-library] › library/inspector/cli-codegen-2.spec.ts:105 › cli codegen › should upload a single file @webkit-macos-26-xlarge
❌ [webkit-library] › library/page-event-crash.spec.ts:42 › should emit crash event when page crashes @webkit-macos-26-xlarge
❌ [webkit-library] › library/page-event-crash.spec.ts:49 › should throw on any action after page crashes @webkit-macos-26-xlarge
❌ [webkit-library] › library/page-event-crash.spec.ts:62 › should cancel waitForEvent when page crashes @webkit-macos-26-xlarge
❌ [webkit-library] › library/page-event-crash.spec.ts:70 › should cancel navigation when page crashes @webkit-macos-26-xlarge
❌ [webkit-library] › library/page-event-crash.spec.ts:80 › should be able to close context when page crashes @webkit-macos-26-xlarge
❌ [webkit-library] › library/trace-viewer.spec.ts:1596 › should remove noscript when javaScriptEnabled is set to true @webkit-macos-26-xlarge
❌ [webkit-library] › library/inspector/cli-codegen-2.spec.ts:105 › cli codegen › should upload a single file @webkit-macos-15-xlarge
❌ [webkit-library] › library/capabilities.spec.ts:95 › should play audio @smoke @webkit-macos-15-large
❌ [webkit-library] › library/inspector/cli-codegen-2.spec.ts:105 › cli codegen › should upload a single file @webkit-macos-15-large
❌ [android-page] › page/page-localstorage.spec.ts:99 › storage methods are scoped to the current origin

79 flaky ⚠️ [chromium-library] › library/trace-viewer.spec.ts:416 › should truncate long return values with ellipsis but copy full value `@chromium-headed-ubuntu-24.04`
⚠️ [chromium-library] › library/popup.spec.ts:261 › should not throw when click closes popup `@msedge-ubuntu-22.04`
⚠️ [chromium-page] › page/page-network-idle.spec.ts:99 › should wait for networkidle in waitForNavigation `@msedge-dev-windows-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:189 › launchServer › should ignore page.pause when headed `@chromium-macos-26-large`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:431 › launchServer › should reject waitForEvent before browser.close finishes `@chromium-tip-of-tree-macos-15--headed`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:1117 › launchServer only › should be able to reconnect to a browser 12 times without warnings `@chromium-tip-of-tree-macos-15--headed`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:161 › launchServer › should not crash on malformed json frame `@chromium-headed-macos-15-xlarge`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:189 › launchServer › should ignore page.pause when headed `@chromium-headed-macos-15-xlarge`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:431 › launchServer › should reject waitForEvent before browser.close finishes `@chromium-headed-macos-15-xlarge`
⚠️ [chromium-library] › library/emulation-focus.spec.ts:104 › should not affect screenshots `@chromium-headed-macos-15-xlarge`
⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-24.04`
⚠️ [chromium-library] › library/browsercontext-proxy.spec.ts:103 › should set cookie for top-level domain `@msedge-macos-latest`
⚠️ [chromium-library] › library/browsercontext-user-agent.spec.ts:110 › should work for navigator.userAgentData and sec-ch-ua headers `@msedge-macos-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:189 › launchServer › should ignore page.pause when headed `@channel-chromium-macos-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:1117 › launchServer only › should be able to reconnect to a browser 12 times without warnings `@channel-chromium-macos-latest`
⚠️ [chromium-library] › library/chromium/tracing.spec.ts:22 › should output a trace `@chromium-macos-15-large`
⚠️ [chromium-page] › page/page-set-input-files.spec.ts:146 › should upload large file `@chromium-macos-15-large`
⚠️ [chromium-page] › page/page-wait-for-selector-2.spec.ts:342 › should succeed if element handle was detached while waiting for hidden `@chromium-macos-15-large`
⚠️ [chromium-page] › page/page-wait-for-selector-2.spec.ts:351 › should succeed if element handle was detached while waiting for detached `@chromium-macos-15-large`
⚠️ [chromium-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@channel-chromium-windows-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:189 › launchServer › should ignore page.pause when headed `@msedge-beta-macos-latest`
⚠️ [chromium-library] › library/chromium/connect-over-cdp.spec.ts:192 › should connect to existing service workers `@chrome-windows-latest`
⚠️ [chromium-page] › page/workers.spec.ts:63 › should have timestamp on worker console messages `@chrome-windows-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:189 › launchServer › should ignore page.pause when headed `@msedge-dev-macos-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:374 › launchServer › should reject navigation when browser closes `@msedge-dev-macos-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:1117 › launchServer only › should be able to reconnect to a browser 12 times without warnings `@msedge-dev-macos-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:141 › launchServer › should be able to reconnect to a browser `@chrome-beta-macos-latest`
⚠️ [chromium-library] › library/browsertype-connect.spec.ts:386 › launchServer › should reject waitForSelector when browser closes `@chrome-beta-macos-latest`
⚠️ [chromium-library] › library/browsercontext-basic.spec.ts:72 › should be able to hover across browser contexts in parallel `@chromium-tip-of-tree-ubuntu-22.04--headed`
⚠️ [chromium-library] › library/popup.spec.ts:261 › should not throw when click closes popup `@chromium-tip-of-tree-ubuntu-22.04--headed`
⚠️ [chromium-library] › library/trace-viewer.spec.ts:416 › should truncate long return values with ellipsis but copy full value `@chromium-tip-of-tree-ubuntu-22.04--headed`
⚠️ [chromium-page] › page/workers.spec.ts:63 › should have timestamp on worker console messages `@chromium-headed-windows-latest`
⚠️ [firefox-library] › library/page-close.spec.ts:152 › should not treat navigations as new popups `@firefox-headed-macos-15-xlarge`
⚠️ [firefox-library] › library/screencast.spec.ts:55 › onFrame receives viewport size `@firefox-headed-macos-15-xlarge`
⚠️ [firefox-page] › page/page-add-locator-handler.spec.ts:212 › should work when owner frame detaches `@firefox-headed-ubuntu-24.04`
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@firefox-beta-windows-latest`
⚠️ [firefox-page] › page/page-request-gc.spec.ts:19 › should work `@firefox-beta-windows-latest`
⚠️ [firefox-library] › library/browsercontext-basic.spec.ts:411 › should emulate media in cross-process iframe `@firefox-headed-windows-latest`
⚠️ [firefox-library] › library/browsercontext-pages.spec.ts:46 › should click with disabled javascript `@firefox-headed-windows-latest`
⚠️ [firefox-library] › library/browsercontext-viewport.spec.ts:29 › should set the proper viewport size `@firefox-headed-windows-latest`
⚠️ [firefox-library] › library/browsercontext-viewport.spec.ts:99 › should emulate availWidth and availHeight `@firefox-headed-windows-latest`
⚠️ [firefox-library] › library/browsercontext-viewport.spec.ts:178 › should be able to get correct orientation angle on non-mobile devices `@firefox-headed-windows-latest`
⚠️ [firefox-library] › library/debugger.spec.ts:19 › should pause at next and resume `@firefox-headed-windows-latest`
⚠️ [firefox-library] › library/browsertype-connect.spec.ts:792 › launchServer › should upload a folder `@firefox-ubuntu-24.04`
⚠️ [firefox-page] › page/page-request-gc.spec.ts:19 › should work `@firefox-ubuntu-24.04`
⚠️ [firefox-library] › library/browsercontext-reuse.spec.ts:326 › reuse connect › should work with clock emulation `@firefox-macos-26-large`
⚠️ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:147 › should have default URL when launching browser `@firefox-macos-26-large`
⚠️ [firefox-library] › library/har.spec.ts:748 › should have different hars for concurrent contexts `@firefox-macos-26-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-2.spec.ts:202 › cli codegen › should download files `@firefox-macos-26-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-csharp.spec.ts:202 › should not print context options method override in mstest if no options were passed `@firefox-macos-26-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-csharp.spec.ts:208 › should print context options method override in mstest if options were passed `@firefox-macos-26-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-java.spec.ts:125 › should print a valid basic program in junit `@firefox-macos-26-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-javascript.spec.ts:84 › should save the codegen output to a file if specified `@firefox-macos-26-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-pytest.spec.ts:49 › should save the codegen output to a file if specified `@firefox-macos-26-large`
⚠️ [firefox-library] › library/video.spec.ts:371 › screencast › should scale frames down to the requested size `@firefox-macos-26-large`
⚠️ [firefox-page] › page/page-click.spec.ts:877 › should click the button when window.innerWidth is corrupted `@firefox-macos-26-large`
⚠️ [firefox-page] › page/page-evaluate.spec.ts:568 › should transfer 100Mb of data from page to node.js `@firefox-macos-26-large`
⚠️ [firefox-page] › page/page-filechooser.spec.ts:24 › should upload multiple large files `@firefox-macos-26-large`
⚠️ [firefox-library] › library/defaultbrowsercontext-2.spec.ts:140 › should create userDataDir if it does not exist `@firefox-macos-15-large`
⚠️ [firefox-library] › library/video.spec.ts:371 › screencast › should scale frames down to the requested size `@firefox-macos-15-large`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-macos-15-large`
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@firefox-windows-latest`
⚠️ [webkit-library] › library/browsertype-connect.spec.ts:792 › launchServer › should upload a folder `@webkit-macos-26-large`
⚠️ [webkit-library] › library/selector-generator.spec.ts:519 › selector generator › should not over-escape for CSS syntax `@webkit-macos-26-large`
⚠️ [webkit-library] › library/trace-viewer.spec.ts:259 › should show action context on locators and other common actions `@webkit-macos-26-large`
⚠️ [webkit-library] › library/tracing.spec.ts:432 › should produce screencast frames fit `@webkit-macos-26-large`
⚠️ [webkit-library] › library/video.spec.ts:181 › screencast › should delete video `@webkit-macos-26-large`
⚠️ [webkit-library] › library/web-socket.spec.ts:22 › should work @smoke `@webkit-macos-26-large`
⚠️ [webkit-library] › library/browsercontext-basic.spec.ts:72 › should be able to hover across browser contexts in parallel `@webkit-headed-ubuntu-24.04`
⚠️ [webkit-library] › library/tap.spec.ts:22 › should send all of the correct events @smoke `@webkit-headed-windows-latest`
⚠️ [webkit-library] › library/browsertype-connect.spec.ts:510 › launchServer › should saveAs videos from remote browser `@webkit-headed-ubuntu-22.04`
⚠️ [webkit-library] › library/har.spec.ts:427 › should return receive time `@webkit-windows-latest`
⚠️ [webkit-library] › library/video.spec.ts:275 › screencast › should capture navigation `@webkit-macos-15-xlarge`
⚠️ [webkit-page] › page/page-set-input-files.spec.ts:38 › should upload a folder `@webkit-macos-15-large`
⚠️ [android-page] › page/page-goto.spec.ts:453 › should disable timeout when its set to 0
⚠️ [android-page] › page/page-localstorage.spec.ts:49 › localStorage.removeItem removes a single item
⚠️ [android-page] › page/page-request-continue.spec.ts:162 › should override method along with url
⚠️ [android-page] › page/page-request-fallback.spec.ts:123 › should amend HTTP headers
⚠️ [android-page] › page/page-route.spec.ts:317 › should not throw if request was cancelled by the page
1 interrupted ⚠️ [webkit-page] › page/elementhandle-bounding-box.spec.ts:22 › should work `@webkit-macos-26-xlarge`

274690 passed, 11711 skipped, 2436 did not run


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: WebKit on Windows hangs when CONNECT proxy closes socket after 407 doesn't reconnect with credentials

2 participants