#634 Detection of HTTPS not working with nginx (iTop always considering the current connection as being secure)

SVN:trunk[2617]
This commit is contained in:
Romain Quetiez
2013-03-13 13:57:51 +00:00
parent 3cf398618e
commit b38dea4bba
6 changed files with 26 additions and 20 deletions

View File

@@ -32,7 +32,7 @@ require_once(APPROOT.'/application/application.inc.php');
require_once(APPROOT.'/application/startup.inc.php');
// this file is generated dynamically with location = here
$sWsdlUri = 'http'.((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']!='off')) ? 's' : '').'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME']).'/../webservices/itop.wsdl.php';
$sWsdlUri = 'http'.(utils::IsConnectionSecure() ? 's' : '').'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME']).'/../webservices/itop.wsdl.php';
if (isset($_REQUEST['service_category']) && (!empty($_REQUEST['service_category'])))
{
$sWsdlUri .= "soapserver.php?service_category=".$_REQUEST['service_category'];
@@ -98,7 +98,7 @@ else
if (is_subclass_of($sPHPClass, 'WebServicesBase'))
{
$sServiceCategory = $sPHPClass;
$sSoapServerUri = 'http'.((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']!='off')) ? 's' : '').'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME']).'/../webservices/soapserver.php';
$sSoapServerUri = 'http'.(utils::IsConnectionSecure() ? 's' : '').'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME']).'/../webservices/soapserver.php';
$sSoapServerUri .= "?service_category=$sServiceCategory";
echo "<li><a href=\"$sSoapServerUri\">$sServiceCategory</a></li>\n";
}