X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=blobdiff_plain;f=http.php;h=2907410ffe4b703e321e7af4573f4be2c9a8884e;hp=76c6684e304edd78ac9966b7179f71d8f541f3ee;hb=HEAD;hpb=900e09b8300463e3dd42e89c21de181520513e95 diff --git a/http.php b/http.php index 76c6684..2907410 100644 --- a/http.php +++ b/http.php @@ -8,7 +8,7 @@ # return our best guess at the url used to access this page, without the path or query string function this_url_sans_path() { - if(strtolower($_SERVER['HTTPS']) == 'on' || strtolower($_SERVER['HTTPS']) == 'yes') { + if (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on' || strtolower($_SERVER['HTTPS']) == 'yes')) { $url = 'https'; $expected_port = 443; } else { @@ -91,5 +91,3 @@ function http_cache_forever($cache_control = 'public') { header("Cache-Control: $cache_control"); header('Expires: ' . gmdate('D, d M Y H:i:s',time()+31536000) . ' GMT'); # rfc 2616 says not to go more than a year in the future } - -?>