[mod_python] Detecting http vs. https

Adrian Holovaty modpython at holovaty.com
Thu Sep 16 21:31:28 EDT 2004


Niklas Aldergren wrote:
> Or, maybe I should just be looking at the proper place for the
> environment, req.subprocess_env.
>
> if req.subprocess_env['HTTPS'] == 'on':

Thanks for your help. This is what I ended up using:

is_https = req.subprocess_env.has_key('HTTPS') \
    and req.subprocess_env['HTTPS'] == 'on'

Adrian


More information about the Mod_python mailing list