silverstripe/sapphire — pull request #439 by simonwelsh (2012-05-13 08:46:54+00:00)
Title: BUGFIX: Director::protocol() was returning https when $_SERVER['HTTPS'] ...

...was an empty value.

From http://www.php.net/manual/en/reserved.variables.server.php:

'HTTPS'
Set to a non-empty value if the script was queried through the HTTPS protocol.

The isset() check would return true if $_SERVER['HTTPS'] were an empty string (say, due to using fastcgi_param HTTPS $https), whereas, going by the description from php.net, an empty string shows it was not queried using HTTPS.