Make WordPress Core


Ignore:
Timestamp:
10/07/2015 02:34:58 AM (9 years ago)
Author:
wonderboymusic
Message:

Introduce wp_get_server_protocol() to DRY protocol parsing logic and make adding more protocols, like HTTP/2, easier.

Props johnbillion, wonderboymusic.
Fixes #34131.

File:
1 edited

Legend:

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

    r34846 r34894  
    993993        return;
    994994
    995     $protocol = $_SERVER['SERVER_PROTOCOL'];
    996     if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
    997         $protocol = 'HTTP/1.0';
     995    $protocol = wp_get_server_protocol();
    998996    $status_header = "$protocol $code $description";
    999997    if ( function_exists( 'apply_filters' ) )
Note: See TracChangeset for help on using the changeset viewer.