heroku/cowboy — pull request #10 by ferd (2014-08-14 18:25:09+00:00)
Title: Support host-less 1.0 requests

When a proxy encounters a 1.0 HTTP request with no Host header *and* a
full path in the request as in:

GET http://example.org/ HTTP/1.0

The proxy is to extract 'example.org' as a host and '/' as a path, and
pass this on to the other side.

The code here adds support for this.

Cowboy may contain double-host headers if someone adds in both an
absolute path *and* a 'host:' header. Given the order of arguments and
the parser, the host in the URL will then take priority over the Host
header that was sent with the request.