Op 9 jan 2012, om 12:44 heeft Marius Gedminas het volgende geschreven:
On Mon, Jan 09, 2012 at 10:01:29AM +0100, Sylvain Viollon wrote:
You can't set a virtual path with the Host header, it is not valid if you want to follow the RFC. After as well, you can include the port in it, but I think you are not sure if you can't really know if you should create https URL or not, you don't have this information (this is not required only to be on port 443, and if it is I am not even sure the port is correctly added in the Host header).
In the WSGI world it's usual to use the X-Forwarded-Scheme header to determine the scheme (http or https), AFAIU.
I have nothing against using those headers, even if there disparities between some of the implementations.
See e.g. http://pythonpaste.org/wsgiproxy/#the-proxy http://pythonpaste.org/deploy/modules/config.html#paste.deploy.config.Prefix... http://packages.python.org/Deliverance/proxy.html http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment...
Regards, Sylvain, -- Sylvain Viollon -- Infrae t +31 10 243 7051 -- http://infrae.com Hoevestraat 10 3033GC Rotterdam -- The Netherlands