Ticket #34131: 34131.diff
File 34131.diff, 1.8 KB (added by , 10 years ago) |
---|
-
src/wp-includes/functions.php
993 993 return; 994 994 995 995 $protocol = $_SERVER['SERVER_PROTOCOL']; 996 if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )996 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) { 997 997 $protocol = 'HTTP/1.0'; 998 } 998 999 $status_header = "$protocol $code $description"; 999 1000 if ( function_exists( 'apply_filters' ) ) 1000 1001 -
src/wp-includes/load.php
113 113 wp_load_translations_early(); 114 114 115 115 $protocol = $_SERVER['SERVER_PROTOCOL']; 116 if ( 'HTTP/1.1' !== $protocol && 'HTTP/1.0' !== $protocol) {116 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) { 117 117 $protocol = 'HTTP/1.0'; 118 118 } 119 119 header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 ); … … 125 125 wp_load_translations_early(); 126 126 127 127 $protocol = $_SERVER['SERVER_PROTOCOL']; 128 if ( 'HTTP/1.1' !== $protocol && 'HTTP/1.0' !== $protocol) {128 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) { 129 129 $protocol = 'HTTP/1.0'; 130 130 } 131 131 header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 ); … … 183 183 wp_load_translations_early(); 184 184 185 185 $protocol = $_SERVER["SERVER_PROTOCOL"]; 186 if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )186 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) { 187 187 $protocol = 'HTTP/1.0'; 188 } 188 189 header( "$protocol 503 Service Unavailable", true, 503 ); 189 190 header( 'Content-Type: text/html; charset=utf-8' ); 190 191 header( 'Retry-After: 600' );