Changeset 2547

Show
Ignore:
Timestamp:
09/14/08 14:10:34 (4 months ago)
Author:
moeffju
Message:

Handle HTTP/1.0 clients. Fixes #631.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/classes/site.php

    r2426 r2547  
    135135                } 
    136136                $portpart= ''; 
    137                 $host= $_SERVER['HTTP_HOST']; 
     137                // HTTP_HOST is not set for HTTP/1.0 requests 
     138                $host= (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']); 
    138139                // if the port isn't a standard port, and isn't part of $host already, add it 
    139140                if ( ( $port != 80 ) && ( $port != 443 ) && ( substr($host, strlen($host) - strlen($port) ) != $port ) ) {