Skip to content

Conversation

@lachlan-roberts
Copy link
Contributor

@lachlan-roberts lachlan-roberts commented Nov 11, 2025

Issue #14016

In PR #12263 the method Response.HttpCookieFacade.getCommentWithoutAttributes(comment) was used to filter out any CookieConfig attributes when setting the comment.

However this breaks its usage with quickstart because the comment attributes are lost in the quickstart-web.xml.

@lachlan-roberts lachlan-roberts self-assigned this Nov 11, 2025
@lachlan-roberts lachlan-roberts added the Sponsored This issue affects a user with a commercial support agreement label Nov 11, 2025
@lachlan-roberts lachlan-roberts moved this to 👀 In review in Jetty 12.0.31 Nov 11, 2025
@janbartel
Copy link
Contributor

In jetty-10 we used to have the method HttpCookie.getCommentWithAttributes where you could generate the comment with the extra fields. We appear to have lost that in jetty-12. I'm a little cautious about having the session cookie config retained both as explicit cookie attributes in the SessionHandler and also in the comment. I feel we should be able to modify the quickstart generator to reconstitute the comment from the attributes.

Signed-off-by: Lachlan Roberts <[email protected]>
@lachlan-roberts
Copy link
Contributor Author

@janbartel thanks, I have changed it to how you suggested.

I reintroduced the getCommentWithAttributes method and am using it from within the QuickStartGeneratorConfiguration.

@lachlan-roberts lachlan-roberts merged commit 45e8430 into jetty-12.0.x Nov 13, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Jetty 12.0.31 Nov 13, 2025
@lachlan-roberts lachlan-roberts deleted the fix/jetty-12.0.x/cookie-config-comment-quickstart branch November 13, 2025 01:10
lachlan-roberts added a commit that referenced this pull request Nov 13, 2025
* Preserve cookie-config comment attribute for quickstart
* PR #14017 - fix for failing test
* PR #14017 - changes from review

Signed-off-by: Lachlan Roberts <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Sponsored This issue affects a user with a commercial support agreement

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Cannot set SameSite config through web.xml in EE8/EE9 when using quickstart

3 participants