WordPress.org

Make WordPress Core

Changeset 5460


Ignore:
Timestamp:
05/12/2007 09:55:14 PM (14 years ago)
Author:
ryan
Message:

Return proper protocol. fixes #3886 for 2.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r5451 r5460  
    932932    $text = get_status_header_desc( $header );
    933933   
    934     if ( empty( $text ) ) {
     934    if ( empty( $text ) )
    935935        return false;
    936     } else {
    937         if ( version_compare( phpversion(), '4.3.0', '>=' ) ) {
    938             return @header( "HTTP/1.1 $header $text", true, $header );
    939         } else {
    940             return @header( "HTTP/1.1 $header $text" );
    941         }
     936
     937    $protocol = $_SERVER["SERVER_PROTOCOL"];
     938    if ( ('HTTP/1.1' != $protocol) && ('HTTP/1.0' != $protocol) )
     939        $protocol = 'HTTP/1.0';
     940    $status_header = "$protocol $header $text";
     941    $status_header = apply_filters('status_header', $status_header, $header, $text, $protocol);
     942
     943    if ( version_compare( phpversion(), '4.3.0', '>=' ) ) {
     944        return @header( $status_header, true, $header );
     945    } else {
     946        return @header( $status_header );
    942947    }
    943948}
Note: See TracChangeset for help on using the changeset viewer.