calavera/puma — pull request #1 by calavera (2013-02-20 03:29:20+00:00)
Title: Respect the header HTTP_X_FORWARDED_PROTO.

I just found out that if the host name in the header HTTP_HOST doesn't include a port number, puma sets it to 80 by default.

When a request is redirected from a web server using ssl, nginx for instance, it should respect the header HTTP_X_FORWARDED_PROTO to set the default server port.
Otherwise rack generates urls like `https://example.com:80/foo/bar` which are invalid.