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

NUTCH-3002 Protocol-okhttp HttpResponse: HTTP header metadata lookup should be case-insensitive #777

Conversation

sebastian-nagel
Copy link
Contributor

  • implement class CaseInsensitiveMetadata providing case-insensitive metadata look-ups (but no spell-checking)
  • use CaseInsensitiveMetadata to hold HTTP header metadata in in the class OkHttpResponse of protocol-okhttp
  • add unit tests to prove the fix (and also case-insensitive look-ups and spell-checking in protocol-http)

The unit tests also include a deactivated benchmark: storing HTTP headers in CaseInsensitiveMetadata is approx. 10% faster than in SpellCheckedMetadata.

…should be case-insensitive

- implement class CaseInsensitiveMetadata providing case-insensitive
  metadata look-ups (but no spell-checking)
- use CaseInsensitiveMetadata to hold HTTP header metadata in
  in the class OkHttpResponse of protocol-okhttp
- add unit tests to prove the fix (and also case-insensitive look-ups
  and spell-checking in protocol-http)
@jnioche
Copy link
Contributor

jnioche commented Oct 6, 2023

since you asked me to have a look at it @sebastian-nagel, it looks good to me!

@sebastian-nagel sebastian-nagel merged commit e96cfc5 into apache:master Oct 21, 2023
1 check passed
@sebastian-nagel sebastian-nagel deleted the NUTCH-3002-protocol-okhttp-case-insensitive-metadata branch October 23, 2023 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants