Skip to content

fix(network): preserve __proto__ HTTP headers - #44351

Closed
microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
fix-44342-45380830792-1
Closed

microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
fix-44342-45380830792-1

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor

headersArrayToObject() assigns into a plain object, so a __proto__ header invokes the inherited setter and is dropped in Chromium and WebKit. Use Object.fromEntries() to preserve it as an own property while retaining case handling and last-value-wins behavior.

Extend the existing browser-context header override test to check the header in the server's raw request headers.

Fixes #44342

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [msedge] › mcp/http.spec.ts:528 › http transport shared context: one idle timer across clients @mcp-windows-latest-msedge

5249 passed, 644 skipped


Merge workflow run.

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor Author

🟢 The failure is a confirmed pre-existing flake

Hi, I'm the Playwright bot. I checked the failure against this PR and the test history.

Details

This covers MCP run 45382121344, for PR head cd77fdc62f7f. The linked report publication run is not another test run.

Pre-existing flake / infra

  • [msedge] › mcp/http.spec.ts:528 › http transport shared context: one idle timer across clients — the shared browser closed and restarted during the active-client phase, failing the browser-count assertion at line 538. The same test on Windows/Edge failed before this PR, in run 41863624044, on feat(test): support project-specific web servers #43860. That earlier failure was at the later assertion waiting for the idle browser to close, not the same assertion as this run. The saved history has 725 passed and 1 failed prior Windows/Edge run attempts for this test, including a pass on main at d70f422f491c.

This PR changes header conversion and a library header test, not the shared idle timer. The failed MCP test does not send the __proto__ header that changes behavior here. No failure is attributed to this PR.

Checked the failures on Linux by the Playwright bot - agent run

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

1 flaky ⚠️ [webkit-library] › library/trace-viewer.spec.ts:616 › TV-029 should show font preview `@webkit-playwright-x64-ubuntu24-64-core-node22`

23672 passed, 708 skipped


Merge workflow run.

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.

[Bug]: extraHTTPHeaders silently drops a valid proto header

1 participant