Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

current "SameSite" attribute values generating error #1194

Open
dabbabi opened this issue Nov 21, 2023 · 1 comment
Open

current "SameSite" attribute values generating error #1194

dabbabi opened this issue Nov 21, 2023 · 1 comment

Comments

@dabbabi
Copy link

dabbabi commented Nov 21, 2023

Greetings,
I would like to report an issue related to the values of the SameSite attribute impacting the behavior of our Jakartaee applications.
Based on draft-ietf-httpbis-rfc6265bis-13 (which should obsoletes RFC 6265 if approved, values of samesite-value are None, Lax and Strict).
Currently browsers can't interpret the value of this flag and return a warning saying that it does not have a proper "SameSite" attribute value. Soon, this behavior will change (as mentioned in Mozilla).
Is it possible, please, in jakarta.ws.rs.core.NewCookie class, to substitute

public enum SameSite {
   NONE,
   LAX,
   STRICT
}

by

public enum SameSite {
   None,
   Lax,
   Strict
}

Otherwise, I'm sure that you've a better solution.
Thank you

@NicoNes
Copy link
Contributor

NicoNes commented Nov 21, 2023

Hey @dabbabi,

Well enum are constants so that's why the names of an enum type's fields are in uppercase letters.

I think the change must be done in the jakarta.ws.rs.ext.RuntimeDelegate.HeaderDelegate<NewCookie> implementation provided by your JAKARTA-RS provider (such as RESTEasy for example).
Its the job of this jakarta.ws.rs.ext.RuntimeDelegate.HeaderDelegate<NewCookie> implementation to convert a NewCookie instance into a String form of an HTTP header.

-- Nicolas

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

No branches or pull requests

2 participants