Issue Bug Closed

#32341$_SERVER['HTTPS'] vs. $_SERVER['HTTP_HTTPS'] nginx

Norbert 12/06/11, 17:14 updated 07/09/13, 09:52

Description

Hi,

Typo3 looks for “$_SERVER[‘HTTPS’]” but nginx “proxy_set_header HTTPS 1” set a “$_SERVER[‘HTTP_HTTPS’]”.

So i think typo3 have to check this in t3lib/class.t3lib_div.php on Line 4153:

$retVal = $_SERVER['SSL_SESSION_ID'] || !strcasecmp($_SERVER['HTTPS'], 'on') || !strcmp($_SERVER['HTTPS'], '1') ? TRUE : FALSE;

Solution:

$retVal = $_SERVER['SSL_SESSION_ID'] || (!strcasecmp($_SERVER['HTTPS'], 'on') || !strcmp($_SERVER['HTTPS'], '1')) && (!strcasecmp($_SERVER['HTTP_HTTPS'], 'on') || !strcmp($_SERVER['HTTP_HTTPS'], '1')) ? TRUE : FALSE;

Regards,

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.