Skip to content

Keep a caller's cookie when the store refuses Set-Cookie - #2349

Merged
hyperxpro merged 2 commits into
mainfrom
fix/redirect-rejected-set-cookie
Sep 23, 2026
Merged

hyperxpro merged 2 commits into
mainfrom
fix/redirect-rejected-set-cookie

Conversation

@hyperxpro

Copy link
Copy Markdown
Member

Motivation:

On a redirect, a Set-Cookie that names a caller's cookie dropped the caller's cookie, even when the store refused the Set-Cookie or scoped it to another path. The next hop got neither cookie.

Modification:

Replace the caller's cookie only when the store holds the new value for the next URI, or when the response deletes it (Max-Age <= 0).

Result:

A refused or off-path Set-Cookie no longer removes the caller's cookie.

@hyperxpro

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: hyperxpro <24762260+hyperxpro@users.noreply.github.com>

Copilot AI commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved and merged main into this branch with conflict fixes in Redirect30xInterceptor. Addressed in commit 5e13ef1.

@hyperxpro
hyperxpro merged commit c1a6063 into main Sep 23, 2026
17 checks passed
@hyperxpro
hyperxpro deleted the fix/redirect-rejected-set-cookie branch September 23, 2026 22:12
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.

2 participants