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

Fix contains in HttpFields name set and prove random access to HttpFields via EnumMap not worth it. #11846

Merged
merged 8 commits into from
Jun 18, 2024

Conversation

gregw
Copy link
Contributor

@gregw gregw commented May 27, 2024

This is an experiment towards fix #11811 with regards to the extra comments received on #11823

It provides an optional random access implementation and fixes the issue that the name set returned is not case sensitive.

Another approach could be to always create the EnumMap when an immutable HttpFields is created and only do the iteration lookup on fields that are not known HttpHeaders

gregw added 2 commits May 27, 2024 17:15
Fix #11811 with javadoc and an optional random access implementation.
Fix #11811 with javadoc and an optional random access implementation.
gregw added 2 commits May 29, 2024 08:39
Fix #11811 with javadoc and an optional random access implementation.
@gregw gregw marked this pull request as ready for review June 4, 2024 22:43
@gregw
Copy link
Contributor Author

gregw commented Jun 4, 2024

@sbordet @lachlan-roberts @lorban review please

Copy link
Contributor

@lorban lorban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost LGTM. I would just like to see some checks for the iterator.

gregw added 3 commits June 7, 2024 09:40
@gregw
Copy link
Contributor Author

gregw commented Jun 11, 2024

I have removed the random access class, but there are some other minor fixes in this PR (for contains checks in name sets). Also some javadoc improvements and the JMH test to show that even enumMap doesn't help.

@gregw gregw changed the title Experiment providing random access to HttpFields. Fix contains in HttpFields name set and prove random access to HttpFields via EnumMap not worth it. Jun 11, 2024
@gregw gregw requested review from sbordet and lorban June 11, 2024 01:51
@gregw gregw merged commit 9505935 into jetty-12.0.x Jun 18, 2024
10 checks passed
@gregw gregw deleted the experiment/12.0.x/11811/randomAccessHttpFields branch June 18, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

getHeaderNames should return header name once also when request has it in different case
4 participants