Changeset 3208 in subversion for trunk/roundcubemail/index.php


Ignore:
Timestamp:
Jan 17, 2010 7:30:41 AM (3 years ago)
Author:
alec
Message:
  • Fix 'force_https' to specified port when URL contains a port number (#1486411)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/index.php

    r3063 r3208  
    6868  $https_port = is_bool($force_https) ? 443 : $force_https; 
    6969  if (!rcube_https_check($https_port)) { 
    70     header('Location: https://' . $_SERVER['HTTP_HOST'] . ($https_port != 443 ? ':' . $https_port : '') . $_SERVER['REQUEST_URI']); 
     70    $host  = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']); 
     71    $host .= ($https_port != 443 ? ':' . $https_port : ''); 
     72    header('Location: https://' . $host . $_SERVER['REQUEST_URI']); 
    7173    exit; 
    7274  } 
Note: See TracChangeset for help on using the changeset viewer.