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

HandshakeRequest getHeaders are case sensitive. #12429

Closed
laurentriviere opened this issue Oct 28, 2024 · 1 comment · Fixed by #12441
Closed

HandshakeRequest getHeaders are case sensitive. #12429

laurentriviere opened this issue Oct 28, 2024 · 1 comment · Fixed by #12441
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@laurentriviere
Copy link

Jetty version(s)
12.0.14

Jetty Environment
ee8

Java version/vendor (use: java -version)
17.0.12

OS type/version
Ubuntu 24.04.1 LTS

Description
In JsrHandshakeRequest the method getHeaders() is case sensitive.

In JavaEE8 and JakartaEE9/10
https://javaee.github.io/javaee-spec/javadocs/javax/websocket/server/HandshakeRequest.html#getHeaders--
Return the read only Map of Http Headers that came with the handshake request. The header names are case insensitive.

How to reproduce?

  • In Jetty 9.4.56 :
    • hReq..getHeaders().get("cookie") return headers for Cookie
    • hReq..getHeaders().get("Cookie") return headers for Cookie
  • In Jetty 12.0.14 :
    • hReq..getHeaders().get("cookie") is null
    • hReq..getHeaders().get("Cookie") return headers for Cookie
@laurentriviere laurentriviere added the Bug For general bugs on Jetty side label Oct 28, 2024
lachlan-roberts added a commit that referenced this issue Oct 30, 2024
lachlan-roberts added a commit that referenced this issue Oct 31, 2024
@sbordet sbordet linked a pull request Nov 3, 2024 that will close this issue
lachlan-roberts added a commit that referenced this issue Nov 12, 2024
…veHeadersWebSocket

Issue #12429 - case-insensitive headers for websocket
@lachlan-roberts
Copy link
Contributor

@laurentriviere thanks for the report, this has been fixed in #12441 and will be available in the next release 12.0.16.

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
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants