Fix for issue #78
This commit is contained in:
parent
6acc979655
commit
a5f8b05912
1 changed files with 8 additions and 2 deletions
10
lib/pico.php
10
lib/pico.php
|
@ -302,8 +302,14 @@ class Pico {
|
|||
*/
|
||||
private function get_protocol()
|
||||
{
|
||||
preg_match("|^HTTP[S]?|is",$_SERVER['SERVER_PROTOCOL'],$m);
|
||||
return strtolower($m[0]);
|
||||
// need to check if HTTPS is set and is not 'off' (and ISAPI/IIS
|
||||
// peculiarity)
|
||||
if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] !== 'off')) {
|
||||
$protocol = 'https';
|
||||
} else {
|
||||
$protocol = 'http';
|
||||
}
|
||||
return $protocol;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue