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

Un-underscore header names provided by Rack #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kainosnoema
Copy link

This fixes two problems:

  • This will now properly convert underscored header names to their dashed equivalent. Custom headers like Content-MD5 turns into HTTP_CONTENT_MD5 in Rack, so converting back from CONTENT_MD5 to CONTENT-MD5 is required.
  • Sometimes Rack's header values are nil. The one I've encountered so far using Rails in development is Origin. This will only set the header if the value is non-nil.

@emilianogfcm
Copy link

You can do a release for this?

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

Successfully merging this pull request may close these issues.

2 participants