Skip to content

Cookies: drop RFC 2109/2965, follow RFC 6265, add SameSite - #1610

Merged
thboileau-git merged 3 commits into
3.0from
feature/cookie-rfc6265
Oct 31, 2026
Merged

thboileau-git merged 3 commits into
3.0from
feature/cookie-rfc6265

Conversation

@thboileau-git

Copy link
Copy Markdown
Collaborator

Summary

Companion 2.7 PR deprecates the legacy API first.

Test plan

  • ./mvnw -B verify -P default,test (Spotless, JaCoCo, SpotBugs)
  • New raw-socket test CookieHeadersTestCase (fails with the old comma joining)
  • CI

🤖 Generated with Claude Code

thboileau and others added 3 commits October 31, 2026 12:17
Cookies are now written in RFC 6265 format only: no Version, Comment or
Discard, no quoting, Max-Age together with Expires, and no $Version,
$Path or $Domain in the request Cookie header. The matching API
(Cookie.get/setVersion, CookieSetting.get/setComment, the constructors
taking them) and the Set-Cookie2 support are removed. Reading stays
lenient: legacy pairs and attributes are ignored, a comma is no longer
a cookie separator, and Max-Age takes precedence over Expires.

Added CookieSetting.get/setSameSite. Repeated Cookie headers are joined
with semicolons in NettyRequest. CookieAuthenticator no longer lets the
next restlet overwrite a login redirection.

Issues #1334, #554.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Split CookieReader.readPair into smaller methods (S3776) and merge the
three request Cookie header tests into a parameterized one (S5976).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Addresses the SonarCloud S1130 finding.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@thboileau-git
thboileau-git merged commit a392e17 into 3.0 Oct 31, 2026
3 checks passed
@thboileau-git
thboileau-git deleted the feature/cookie-rfc6265 branch October 31, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants