Fix HTTPS protocol detection
authorJaroslav Škarvada <jskarvad@redhat.com>
Wed, 5 Mar 2014 11:03:17 +0000 (12:03 +0100)
committerAnomie <bjorsch@wikimedia.org>
Fri, 16 Jan 2015 16:22:54 +0000 (16:22 +0000)
commit89a5f17463dba70cbb9d5b9edbf797af965317e1
treeeb2987e91883c8325726c45f87b99b0d20187441
parent3bb71d9fc2ff297fc74ec4e8f4f71a5bfc5f16a2
Fix HTTPS protocol detection

According to PHP documentation:
http://www.php.net/manual/en/reserved.variables.server.php
The $_SERVER['HTTPS'] is set to a non-empty value if the script was queried
through the HTTPS protocol. There is also note that for ISAPI with IIS, the
value is set to 'off' if the request was not made through the HTTPS protocol.

To follow the PHP documentation the $_SERVER['HTTPS'] == 'on' doesn't seem
to be the correct way how to detect the HTTPS protocol (there maybe e.g. '1'
instead of 'on').

Bug: 46511
Change-Id: I5675fed9b7d54711b96b25702181112ef3692f3c
includes/WebRequest.php