mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Introduce wp_get_server_protocol() to DRY protocol parsing logic and make adding more protocols, like HTTP/2, easier.
Props johnbillion, wonderboymusic. Fixes #34131. git-svn-id: https://develop.svn.wordpress.org/trunk@34894 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -992,9 +992,7 @@ function status_header( $code ) {
|
||||
if ( empty( $description ) )
|
||||
return;
|
||||
|
||||
$protocol = $_SERVER['SERVER_PROTOCOL'];
|
||||
if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
|
||||
$protocol = 'HTTP/1.0';
|
||||
$protocol = wp_get_server_protocol();
|
||||
$status_header = "$protocol $code $description";
|
||||
if ( function_exists( 'apply_filters' ) )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user