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

Make all header operations case-insensitive #14

Open
willarmiros opened this issue Jan 25, 2021 · 0 comments
Open

Make all header operations case-insensitive #14

willarmiros opened this issue Jan 25, 2021 · 0 comments

Comments

@willarmiros
Copy link
Contributor

Right now, header data is stored internally using a regular Map. Right now, if you are consuming a ProtocolEvent and would like to get header data, you do something like this:

String headerData = httpNetworkProtocolRequestEvent.getHeaderData("x-forwarded-for");

However if the header is stored internally as X-Forwarded-For or some other casing, the above returns null despite the header being present. We should consider switching to using a TreeMap or similar implementation which can use case-insensitive keys, because header keys are case-insensitive.

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

1 participant