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

servlet 6.1 tck cookie test errors #11934

Closed
janbartel opened this issue Jun 20, 2024 · 1 comment
Closed

servlet 6.1 tck cookie test errors #11934

janbartel opened this issue Jun 20, 2024 · 1 comment
Assignees
Labels
Bug For general bugs on Jetty side TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc)

Comments

@janbartel
Copy link
Contributor

janbartel commented Jun 20, 2024

Jetty version(s)
jetty-12.1.x

Failing Test servlet.tck.api.jakarta_servlet_http.cookie.CookieTests.getValueQuotedTest

This test sends a cookie from the client to the server that is constructed like so:

"Cookie: name1=\"value1\"; Domain=" + _hostname + "; Path=/servlet_jsh_cookie_web"

The test expects that the value of the name1 cookie is interpreted by the server as "value1", ie that double quotes are retained.

Failing Test servlet.tck.api.jakarta_servlet_http.cookie.CookieTests.setMaxAgeZeroTest

The test creates a Cookie and calls setMaxAge(0) on it. The test expects that the Max-Age field will be missing on the Set-Cookie response header, but we are sending Max-Age=0. Looking at RFC6265 it does seem that Max-Age should never be 0:

max-age-av        = "Max-Age=" non-zero-digit *DIGIT

Failing Test servlet.tck.api.jakarta_servlet_http.cookie.CookieTests.setPartitionedTest

The test creates a Cookie and calls setAttribute("Partitioned", "") The test expects that a Set-Cookie will contain Partitioned, however, we only send Partitioned iff setAttribute("Partitioned", "true") was called.

@janbartel janbartel added Bug For general bugs on Jetty side TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc) labels Jun 20, 2024
@janbartel janbartel changed the title servlet 6.1 tck test error servlet.tck.api.jakarta_servlet_http.cookie.CookieTests.getValueQuotedTest servlet 6.1 tck cookie test errors Jun 20, 2024
gregw added a commit that referenced this issue Jun 20, 2024
Added compliance mode MAINTAIN_QUOTES to keep the quotes as part of the cookie value.  Added mode RFC6265_QUOTED that includes this violation
gregw added a commit that referenced this issue Jun 20, 2024
Never send a zero valued max-age parameter
gregw added a commit that referenced this issue Jun 20, 2024
Partitioned is set if any attribute that is not "false" is set.
gregw added a commit that referenced this issue Jun 20, 2024
Partitioned is set if any attribute that is not "false" is set.
Avoid equal sign for empty valued attributes
gregw added a commit that referenced this issue Jun 20, 2024
Added compliance mode MAINTAIN_QUOTES to keep the quotes as part of the cookie value.  Added mode RFC6265_QUOTED that includes this violation
gregw added a commit that referenced this issue Jun 20, 2024
Never send a zero valued max-age parameter
gregw added a commit that referenced this issue Jun 20, 2024
Partitioned is set if any attribute that is not "false" is set.
gregw added a commit that referenced this issue Jun 20, 2024
Partitioned is set if any attribute that is not "false" is set.
Avoid equal sign for empty valued attributes
gregw added a commit that referenced this issue Jun 23, 2024
* Fix #11934 Servlet 6.1 Cookies
* Added compliance mode MAINTAIN_QUOTES to keep the quotes as part of the cookie value.  Added mode RFC6265_QUOTED that includes this violation
* Never send a zero valued max-age parameter
* Partitioned is set if any attribute that is not "false" is set.
* Avoid equal sign for empty valued attributes
* Pushed responses delete max-age==0 cookies
@janbartel
Copy link
Contributor Author

Fixed via #11936

@github-project-automation github-project-automation bot moved this to ✅ Done in Jetty 12.1.0 Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc)
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants