Do not redirect to HTTPS when it's not supported
authorGergő Tisza <gtisza@wikimedia.org>
Thu, 26 May 2016 18:04:02 +0000 (18:04 +0000)
committerGergő Tisza <gtisza@wikimedia.org>
Tue, 31 May 2016 16:35:40 +0000 (16:35 +0000)
commit69f52123bb71d089e81c8e5427806450c201a35c
treed57d4d24b417596b01ce59ade8bd105254f157b3
parent06ab9c0942f66317b20130ed12e677607783a61e
Do not redirect to HTTPS when it's not supported

Most URL generation happens via wfExpandUrl, which honors $wgServer
(or whatever setting it is told to use): if it has an explicit
protcol, that is always used; if it is a protocol-relative URL,
the protocol is selected based on the parameters given to wfExpandUrl.

One exception is MediaWiki::main() which always uses HTTPS if the
relevant cookie or user option is set, even if the wiki does not
support it. That can lead to annoying problems on Vagrant where it
is not unusual to turn HTTPS support on and off: when that happens,
the user can get locked out of the account.

Change-Id: I06982a26cd808f2aaa26753cd3353ed82473d9e0
includes/MediaWiki.php