-
Notifications
You must be signed in to change notification settings - Fork 222
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
Case-sensitive look up on allowed headers map #176
Comments
The spec says headers are sent as a ordered lowercase list. Is there a specific case where this change break something? |
Well it broke my code :) In my investigation, I was following the docs @ https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS which uses mixed case values in the CSV argument to I see the spec is conflicts with that (as you mention) |
@EmmEff The middleware is working as expected. That v1.11.0 broke your code/tests is unfortunate, but your tests arguably shouldn't be coupled so strongly to the intricacies of rs/cors's implementation. I'd be interested to see the failing test in question.
Indeed; for instance,
should read
Well spotted; I understand how that can trip people up. In that case, the right thing to do is open an issue on https://github.com/mdn/content; I'll do that. |
@EmmEff Are you still experiencing problems or can we this issue be closed now? |
Allowed headers are ingested correctly in initialization and in the call
cors.handlePreflght()
:cors/cors.go
Line 368 in 3d336ea
The headers in the request are handled AS IS.
Allowed headers are normalized during initialization:
cors/cors.go
Line 199 in 3d336ea
In the function
SortedSet.Subsumes()
, a case-sensitive lookup is done on the map:cors/internal/sortedset.go
Line 76 in 3d336ea
This issue surfaced in the v1.11.0 release.
The text was updated successfully, but these errors were encountered: