Changeset 2463 for trunk/framework/Web/THttpRequest.php
- Timestamp:
- 05/20/2008 05:57:37 AM (6 months ago)
- Files:
-
- 1 modified
-
trunk/framework/Web/THttpRequest.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/framework/Web/THttpRequest.php
r2462 r2463 367 367 public function getBaseUrl($forceSecureConnection=false) 368 368 { 369 $secure=$this->getIsSecureConnection() || $forceSecureConnection; 370 $url=($secure ? "https://" : "http://") . $_SERVER ['HTTP_HOST']; 371 $port=$_SERVER['SERVER_PORT']; 372 if(($port!=80 && !$secure) || ($port!=443 && $secure)) 373 $url.=':'.$port; 374 return $url; 369 $url=$this->getUrl(); 370 $scheme=($forceSecureConnection)?"https":$url->getScheme(); 371 $host=$url->getHost(); 372 if (($port=$url->getPort())) $host.=':'.$port; 373 return $scheme.'://'.$host; 375 374 } 376 375
