MantisBT: master-1.2.x 0af2d629

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2012-05-30 22:53 master-1.2.x 0777b3bd
Affected Issues  0014333: mantis bt switches to https from http
Changeset

Make test for HTTPS protocol compliant with PHP documentation

Prior to this, the protocol was considered to be HTTPS when
isset($_SERVER['HTTPS']) is true, while PHP doc[1] states that HTTPS is
"Set to a non-empty value if the script was queried through the HTTPS
protocol" so the test should be !empty($_SERVER['HTTPS']) instead.

This was causing issues with nginx 1.x with php5fastcgi as
$_SERVER['HTTPS'] is set but empty, thus MantisBT redirects all http
requests to https.

The protocol check has been moved to a new function in http_api.php
which is then called wherever it is needed.

Note that there are several occurences of isset($_SERVER['HTTPS']) in
the nusoap library; these have not been modified.

Fixes 0014333

[1] http://php.net/manual/en/reserved.variables.server.php

mod - config_defaults_inc.php Diff File
mod - core/gpc_api.php Diff File
mod - core/http_api.php Diff File
mod - core/user_api.php Diff File
mod - file_download.php Diff File