Changeset 2496

Show
Ignore:
Timestamp:
09/13/08 01:50:41 (4 months ago)
Author:
sean
Message:

"handle" HTTP/1.0 clients; fixes #631

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/bughunt200809/system/classes/site.php

    r2495 r2496  
    126126        { 
    127127            case 'host': 
     128                if ( !isset( $_SERVER['HTTP_HOST'] ) || 
     129                    ( isset( $_SERVER['SERVER_PROTOCOL'] ) && $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0' ) ) { 
     130                    // we've got HTTP/1.0, on our hands; so don't send back the host: 
     131                    $url = ''; 
     132                    break; 
     133                } 
     134                // anything after HTTP/1.0, we have a host header, so we should use it 
    128135                $protocol= 'http'; 
    129136                // If we're running on a port other than 80, i