Index: trunk/core/kernel/application.php =================================================================== diff -u -r2669 -r2676 --- trunk/core/kernel/application.php (.../application.php) (revision 2669) +++ trunk/core/kernel/application.php (.../application.php) (revision 2676) @@ -676,8 +676,8 @@ if (!preg_match('#'.preg_quote($cookie_url).'#', $ssl_url)) { $session->SetMode(smGET_ONLY); } - unset($params['__SSL__']); } + unset($params['__SSL__']); if (getArrayValue($params, 'opener') == 'u') { $opener_stack=$this->RecallVar('opener_stack'); Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -r2672 -r2676 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 2672) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 2676) @@ -733,11 +733,15 @@ unset($pass['env']); if ($require) { - if (PROTOCOL == 'https://') return; + if (PROTOCOL == 'https://') { + $this->Application->SetVar('__KEEP_SSL__', 1); + return; + } $this->Application->Redirect('', array_merge_recursive2($pass, Array('__SSL__' => 1))); } else { if (PROTOCOL == 'https://' && $this->Application->ConfigValue('Force_HTTP_When_SSL_Not_Required')) { + if ($this->Application->GetVar('__KEEP_SSL__')) return; $this->Application->Redirect('', array_merge_recursive2($pass, Array('__SSL__' => 0))); } }