WordPress.org

Make WordPress Core

Changeset 5461


Ignore:
Timestamp:
05/12/2007 09:58:38 PM (13 years ago)
Author:
ryan
Message:

Return proper protocol. fixes #3886 for 2.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-includes/functions.php

    r5410 r5461  
    916916        $text = 'Gone';
    917917
    918     if ( version_compare(phpversion(), '4.3.0', '>=') )
    919         @header("HTTP/1.1 $header $text", true, $header);
    920     else
    921         @header("HTTP/1.1 $header $text");
     918    $protocol = $_SERVER["SERVER_PROTOCOL"];
     919    if ( ('HTTP/1.1' != $protocol) && ('HTTP/1.0' != $protocol) )
     920        $protocol = 'HTTP/1.0';
     921    $status_header = "$protocol $header $text";
     922    $status_header = apply_filters('status_header', $status_header, $header, $text, $protocol);
     923
     924    if ( version_compare( phpversion(), '4.3.0', '>=' ) ) {
     925        return @header( $status_header, true, $header );
     926    } else {
     927        return @header( $status_header );
     928    }
    922929}
    923930
Note: See TracChangeset for help on using the changeset viewer.