Changeset 45731
- Timestamp:
- 08/03/2019 10:16:23 PM (5 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/load-scripts.php
r45456 r45731 15 15 define( 'WPINC', 'wp-includes' ); 16 16 17 $protocol = $_SERVER['SERVER_PROTOCOL']; 18 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) { 19 $protocol = 'HTTP/1.0'; 20 } 21 17 22 $load = $_GET['load']; 18 23 if ( is_array( $load ) ) { … … 25 30 26 31 if ( empty( $load ) ) { 32 header( "$protocol 400 Bad Request" ); 27 33 exit; 28 34 } … … 41 47 42 48 if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) { 43 $protocol = $_SERVER['SERVER_PROTOCOL'];44 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) {45 $protocol = 'HTTP/1.0';46 }47 49 header( "$protocol 304 Not Modified" ); 48 50 exit(); -
trunk/src/wp-admin/load-styles.php
r45456 r45731 19 19 require( ABSPATH . WPINC . '/version.php' ); 20 20 21 $protocol = $_SERVER['SERVER_PROTOCOL']; 22 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) { 23 $protocol = 'HTTP/1.0'; 24 } 25 21 26 $load = $_GET['load']; 22 27 if ( is_array( $load ) ) { … … 29 34 30 35 if ( empty( $load ) ) { 36 header( "$protocol 400 Bad Request" ); 31 37 exit; 32 38 } … … 40 46 41 47 if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) { 42 $protocol = $_SERVER['SERVER_PROTOCOL'];43 if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) {44 $protocol = 'HTTP/1.0';45 }46 48 header( "$protocol 304 Not Modified" ); 47 49 exit();
Note: See TracChangeset
for help on using the changeset viewer.