#18366957 : fixed a bug using wrong port for getting url of different protocol

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6881 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2009-10-21 06:56:35 +00:00
parent ab2e480517
commit 2c76ce0757

View file

@ -930,9 +930,11 @@
if(isset($url[$ssl_mode][$domain_key])) return $url[$ssl_mode][$domain_key];
$current_use_ssl = $_SERVER['HTTPS']=='on' ? true : false;
switch($ssl_mode) {
case FOLLOW_REQUEST_SSL :
if($_SERVER['HTTPS']=='on') $use_ssl = true;
if($current_use_ssl) $use_ssl = true;
else $use_ssl = false;
break;
case ENFORCE_SSL :
@ -951,6 +953,12 @@
}
$url_info = parse_url('http://'.$target_url);
if($current_use_ssl != $use_ssl)
{
unset($url_info['port']);
}
if($use_ssl) {
if(Context::get("_https_port") && Context::get("_https_port") != 443) {
$url_info['port'] = Context::get("_https_port");