Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Headers work with nginx #18

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

This fixes a big problem with nginx. nginx does not send some headers if they have an underscore in them. Since this is a Rack middleware, all headers will be converted into HTTP_FOO_BAR. The original header may have been Foo-Bar or Foo_Bar. We may never know. Actually is a very annoying problem with rack because you can't access the original headers. So, we simply replace _'s with - and everything is cool. Most likely the _'s were -'s in the first place.

Headers work with nginx
This fixes a big problem with nginx. nginx does not send some headers if they have an underscore in them. Since this is a Rack middleware, all headers will be converted into HTTP_FOO_BAR. The original header may have been Foo-Bar or Foo_Bar. We may never know. Actually is a very annoying problem with rack because you can't access the original headers. So, we simply replace `_`'s with `-` and everything is cool. Most likely the `_`'s were `-`'s in the first place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment