Repository navigation
fix(http): identify cookies by name, domain and path - #10471
Merged
tim-smart merged 7 commits intoNov 9, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: a1995d2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Nov 8, 2026
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
effect-bot
force-pushed
the
fix/cookies-identity
branch
from
November 9, 2026 00:08
716c06f to
8ba73dc
Compare
effect-bot
marked this pull request as ready for review
November 9, 2026 00:08
tim-smart
pushed a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 16, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 17, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 20, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 22, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 22, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 24, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 24, 2026
Co-authored-by: Effect Bot <[email protected]>
effect-bot
added a commit
that referenced
this pull request
Nov 24, 2026
Co-authored-by: Effect Bot <[email protected]>
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.
Summary
Cookieswas keyed by cookie name only, so adding a cookie replaced any earlier cookie with that name even when itsDomainorPathdiffered. RFC 6265 §5.3 identifies a cookie by name, domain and path, and browsers keep both.HttpClientResponse.cookieskept only the lastSet-Cookieper name, soHttpClient.withCookiesRefnever stored the others.HttpServerResponse.setCookieandexpireCookiecould not set or expire one name for two scopes in the same response, andfromWebdropped them when proxying.Cookiesnow identifies cookies by name, domain (ignoring a leading dot and letter case) and path everywhere.Cookies.cookiesis an orderedReadonlyArray<Cookie>: adding a cookie removes the one with the same identity and appends the new one, so the array is in last-set order.get,getValue,toRecordandtoCookieHeaderuse the cookie set last for a name;toSetCookieHeadersandmergeIntoArrayuse every cookie in order.remove(name)drops every scope of the name.This is the breaking alternative to #10470, which keeps the name-based API and only stops
fromSetCookiefrom dropping cookies.Breaking changes
Cookiesis@stability unstable, so the changeset isminor.Cookies.cookieschanges from a name-keyed record toReadonlyArray<Cookie>, and theSchema.Cookiesisomorphic encoding changes fromRecord(String, Cookie)toArray(Cookie). Code readingcookies.cookies[name]stops compiling; useCookies.getorCookies.getValue.fromReadonlyRecordremains asfromIterable(Object.values(record)).Cookiesconstructor and combinator that adds a cookie, such asfromIterable,setCookie,set,setAll,expireCookieandmerge, and theHttpServerResponsecookie helpers, replace an existing cookie only when its name, domain and path match. A missing path is distinct frompath: "/"because the default path depends on the request URL, soexpireCookie("session")aftersetCookie("session", v, { path: "/" })now sends both headers instead of only the expiry.Validation
pnpm test --run packages/effect/test/http packages/effect/test/schema packages/platform/node/test/HttpApi.test.ts packages/platform/node/test/NodeHttpServer.test.ts packages/platform/browser/test/BrowserHttpClient.test.ts: 3945 passed, 1 skippedpnpm check,pnpm check-tsc,pnpm lint,pnpm jsdocs --checkCloses #10469
Closes EFF-3508
Closes EFF-3506