jaswope/rack-reverse-proxy — pull request #42 by kainosnoema (2014-07-25 17:42:11+00:00)
Title: Un-underscore header names provided by Rack

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`.