Ignore:
Timestamp:
Jul 7, 2007, 4:10:11 AM (17 years ago)
Author:
rvelices
Message:

merge r2052 from branch-1_7 to trunk

  • fix set_status_header for fastCGI installations that are strict in terms of http protocol (1.0 or 1.1)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_html.inc.php

    r2029 r2053  
    705705      case 403: $text='Forbidden';break;
    706706      case 404: $text='Not found';break;
    707     }
    708   }
    709   header("HTTP/1.1 $code $text");
    710   header("Status: $code $text");
     707      case 500: $text='Server error';break;
     708      case 503: $text='Service unavailable';break;
     709    }
     710  }
     711        $protocol = $_SERVER["SERVER_PROTOCOL"];
     712        if ( ('HTTP/1.1' != $protocol) && ('HTTP/1.0' != $protocol) )
     713                $protocol = 'HTTP/1.0';
     714
     715        if ( version_compare( phpversion(), '4.3.0', '>=' ) )
     716  {
     717                header( "$protocol $code $text", true, $code );
     718        }
     719  else
     720  {
     721                header( "$protocol $code $text" );
     722        }
    711723  trigger_action('set_status_header', $code, $text);
    712724}
Note: See TracChangeset for help on using the changeset viewer.