Skip to content

fix(fetch): prefer Max-Age over Expires in Set-Cookie - #43146

Merged
Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:fix-43077
Oct 6, 2026
Merged

Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:fix-43077

Conversation

@dgozman

Copy link
Copy Markdown
Collaborator

Summary

  • Max-Age now takes precedence over Expires in Set-Cookie regardless of attribute order, per RFC 6265 §5.3.
  • A Max-Age value that is not an integer (e.g. 10abc) is now ignored, per RFC 6265 §5.2.2.

Fixes #43077

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [chrome] › mcp/session-log.spec.ts:87 › session log should recover after write failure @mcp-macos-latest-chrome
❌ [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-core.spec.ts:57 › click link @mcp-windows-latest-firefox

9032 passed, 1495 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failures.

🟡 One failure is uncertain; two are confirmed pre-existing flakes

The cookie parsing change does not reach these MCP tests, so the failures look unrelated to this PR. However, I could not find the same session-log.spec.ts test failing on another SHA, so it remains uncertain under the CI triage criteria.

Details

This PR only changes cookieStore.ts and global-fetch-cookie.spec.ts. None of the failing tests exercise cookie parsing or the global fetch cookie jar.

Uncertain

  • [chrome] › mcp/session-log.spec.ts:87 › session log should recover after write failure (@mcp-macos-latest-chrome) — timed out after the MCP connection closed. The signature and unrelated code path lean toward a flake, but I found no prior failure of this exact test on an unrelated SHA. A matching failure elsewhere is needed to classify it as pre-existing.

Pre-existing flake / infra

Triaged by the Playwright bot - agent run

@dgozman
Dmitry Gozman (dgozman) merged commit 68e0be8 into microsoft:main Oct 6, 2026
42 of 44 checks passed
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]: APIRequestContext drops a cookie whose Set-Cookie has Max-Age followed by a past Expires (Max-Age should take precedence)

2 participants