evanphx/puma — pull request #43 by bporterfield (2012-02-26 20:37:58+00:00)
Title: Rack::Request.scheme should return https if running SSLServer

Don't think I'm getting the right value for Rack::Request.scheme when running Puma using ssl.

To test - config.ru:

class Test
def call(env)
request = Rack::Request.new(env)
return [200, {}, ["#{request.scheme}"]]
end
end
run Test.new

Starting with: `puma -b tcp://127.0.0.1:3000 config.ru` and hitting `http://localhost:3000` returns `http`.

Starting with

puma -b 'ssl://127.0.0.1:3000?key=puma/puma_keypair.pem&cert=puma/cert_puma.pem' config.ru

and hitting `https://localhost:3000` still returns `http`.

Setting HTTPS_KEY when using ssl server returns the proper rack.url_scheme