http11: handle "X-Forwarded-Proto: https"
commite26ebc985b882c38da50fb0104791a5f2c0f8522
authorEric Wong <normalperson@yhbt.net>
Thu, 9 Apr 2009 00:42:23 +0000 (8 17:42 -0700)
committerEric Wong <normalperson@yhbt.net>
Thu, 9 Apr 2009 00:42:23 +0000 (8 17:42 -0700)
treeaed3ecdde023b3809c7ee9de6c8e8ed63fe1f8b0
parent9625ad39b73d3d1443ff097e9113d1ec9c9d5f00
http11: handle "X-Forwarded-Proto: https"

Pass "https" to "rack.url_scheme" if the X-Forwarded-Proto
header matches "https".  X-Forwarded-Proto is a semi-standard
header that Ruby frameworks seem to respect; so we use that.

We won't support ENV['HTTPS'] since that can only be set at
start time and some app servers supporting https also support
http.

Currently, "rack.url_scheme" only allows "http" and "https",
so we won't set anything else to avoid breaking Rack::Lint.
ext/unicorn/http11/http11.c
lib/unicorn/http_request.rb
test/unit/test_request.rb