`Cookies` drops same-name cookies set for a different domain or path
メンテナーはふだん 1 日以内に返信
@effect-bot がすでに取り組んでいます。
2026年11月8日 から。
評価
この issue はまだ評価されていません。
説明
What version of Effect is running?
4.1.2 (also main)
What steps can reproduce the bug?
import { Cookies, HttpClientRequest, HttpClientResponse } from "effect/http"
const headers = new Headers()
headers.append("set-cookie", "token=root; Path=/")
headers.append("set-cookie", "token=api; Path=/api")
const response = HttpClientResponse.fromWeb(
HttpClientRequest.get("https://example.com/login"),
new Response(null, { headers })
)
Cookies.toSetCookieHeaders(response.cookies)
What is the expected behavior?
["token=root; Path=/", "token=api; Path=/api"]. RFC 6265 §5.3 identifies a cookie by name, domain and path, and browsers keep both.
What do you see instead?
["token=api; Path=/api"]. Cookies is keyed by name, so a later cookie replaces an earlier one with the same name whatever its Domain or Path.
Additional information
HttpClient.withCookiesRefscopes its jar by name, domain and path since #9614, but it is fed fromresponse.cookies, sotoken=rootis never stored and sent. A logout atwww.example.comthat clearssessionfor both the host andDomain=example.comonly deletes one of them.- On the server,
HttpServerResponse.setCookieandexpireCookiecannot set or expire one name for two scopes in the same response, andfromWebdrops them when proxying. - The only lossless workaround on the client is
HttpClientResponse.toWebon fetch-backed responses, which hands over the body.response.headerskeeps oneset-cookievalue, either the last one or all of them joined with commas, whichExpiresdates make unsplittable.
#9614 listed this case as out of scope. I've opened two draft PRs with alternative fixes: #10470 keeps the name-based Cookies API and only stops parsing from dropping cookies (patch); #10471 identifies cookies by name, domain and path everywhere (breaking, minor).
- 主要言語
- TypeScript
- スター
- 16.7k
- フォーク
- 808
- 平均マージ
- 17時間 9分
- マージ済み PR(30日)
- 825
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Effect-TS/effect のほかの issue
-
Tuple.map: accept ordinary callbacks while preserving tuple length対応中かも @effect-bot が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Arbitrary.schema: no generation override for a struct's cross-field filter, and lookahead patterns are skipped quietly対応中かも @effect-bot が 1 日前に担当しました。 オープン
Effect-TS/effect#10479 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Schema: a public way to derive a canonical codec, as `toCodecJson` and `toCodecStringTree` do対応中かも @effect-bot が 3 日前に担当しました。 オープンNeeds Proposal schema
Effect-TS/effect#10457 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
McpServer.layerHttp: optional legacy GET SSE for idle list-change notifications対応中かも @effect-bot が 4 日前に担当しました。 オープン
Effect-TS/effect#10436 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
McpServer.layerStdio: native EOF cancellation policy for active tool handlers対応中かも @effect-bot が 5 日前に担当しました。 オープン
Effect-TS/effect#10412 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Effect-TS/effect の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
home-assistant/frontend#55841 ·
メンテナーはふだん 1 日以内に返信
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
lingdojo/kana-dojo#33905 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug(semester-planning): the edit application dialog cannot save with an empty «Annet fra bedriften»オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
MetaMask/eth-phishing-detect#311215 ·
メンテナーはふだん 1 日以内に返信
-
Explore filter: multi-select value list with allowNewOptions stops accepting values and drops earlier ones対応中かも @isaac-jaynes-imperva が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/superset#46146 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信