Graham Dumpleton <graham.dumple...@gmail.com> added the comment:

As has been pointed out to you already in other forums, the correct way of 
detecting in a compliant WSGI application that a SSL connection was used is to 
check the value of the wsgi.url_scheme variable. If your code does not do this 
then it is not a compliant WSGI application and you have no guarantee that it 
will work portably across different WSGI hosting mechanisms. This is because a 
WSGI server/adapter is not obligated to set the HTTPS variable in the WSGI 
environment dictionary.

So, the correct thing to do, which for some reasons you don't want to, is to 
fix your code when it is being ported to adhere to the WSGI specification and 
what it dictates as the way of detecting a SSL connection.

FWIW, the HTTPS variable will no longer be set from mod_wsgi version 4.0 to 
enforce the point that it is not the correct way of detecting that an SSL 
connection and that wsgi.url_scheme should be used. The HTTPS variable was only 
being set at all and with that value because older versions of Django weren't 
doing what you also refuse to do, which is check for wsgi.url_scheme instead of 
the HTTPS variable. Django did the right thing and fixed their code to be 
compliant. Why you can't and want to keep arguing this point in three different 
forums is beyond me. You have spent way much more time arguing the point than 
it would take to fix your code to be compliant.

----------
nosy: +grahamd

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10906>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to