-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
getHeaderNames should return header name once also when request has it in different case #11811
Comments
This code is potentially wrong because of this: https://github.com/jakartaee/servlet/blob/26a58cb1a6f148b56e274bf0f8030176d20cfeb6/api/src/main/java/jakarta/servlet/http/HttpServlet.java#L565 |
I can confirm a reproduction... investigating.... |
Fix #11811 insensitive header name set by: + Using a EnumSet and TreeSet to ensure no duplicates in the set + Using an ArrayList to preserve the ordering (not necessary, but useful).
Reopened to add some comments to HttpFields regarding how it is implemented as a list and the reasons behind that (see #3682) |
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
Jetty version(s)
12.0.9
Jetty Environment
ee10
Java version/vendor
(use: java -version)
Java 22
OS type/version
MacOS
Description
request.getHeaderNames
is typically used to iterate over header names in the request and thenrequest.getHeaders
is used to retrieve values:When request contains both
Foo-Bar
andfoo-bar
headers,getHeaderNames
returns both String values, sofoo-bar
header values are processed twice.How to reproduce?
The text was updated successfully, but these errors were encountered: