skaar <sk...@waste.org> wrote:
> Eric,
> 
> think I came across an issue with the parser in unicorn, with a request
> (due to 2 layers of nginx proxying) coming across with both a
> X_FORWARDED_PROTO and a X-Forwarded-Proto header. From the socket (in
> HttpRequest) - we get:
> 
>   X_FORWARDED_PROTO: http
>   X-Forwarded-Proto: https
> 
> which is parsed to 
> 
>   HTTP_X_FORWARDED_PROTO"=>"http,https
> 
> There was a passenger ticket that describes that from nginx's point of
> view - X-Forwarded-Proto is the "correct" form. 

Hi skaar,

The Rack (and CGI) specs require that '-' be replaced with '_' for
HTTP header names, so Unicorn is doing the correct thing and treating
it as the same header.

Even though '_' appears to be allowed in header names by rfc 2616, it's
use is questionable as there are parsers that reject it.  Any chance of
fixing whatever sends the "X_FORWARDED_PROTO" header?  It's completely
pointless to set to "http"

-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to