GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
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?
to your account
The equality comparison is case insensitive according to the HTTP specs. Right now, we don't make that distinction.
Header keys are wrapped in the CI type constructor, which ensures a case insensitive comparison. Is there a specific counterexample?
@snoyberg I think this Header is not wrapped in CI type constructor: https://www.stackage.org/haddock/lts-8.22/yesod-core-1.4.35/Yesod-Core.html#t:Header
I think it would be better to just wrap it in CI type constructor instead of doing Eq instance fix.
At the moment the code in #1417 would still need to be changed to use Eq on Header - does this actually go any wider than that code, or would it be best just to use CI for case-insensitivity there, for that one comparison?
I would vote for using CI for case-insensitivity there as that's the most easiest thing to do. :)
@psibi Up until now, there has been no comparison performed there that I'm aware of. 20/20 hindsight, it would make sense to use CI ByteString, but I'd rather not break the API for this.
Successfully merging a pull request may close this issue.