Changeset 45731 for trunk/src/wp-admin/load-scripts.php
- Timestamp:
- 08/03/2019 10:16:23 PM (6 years ago)
- File:
-
- 1 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();
Note: See TracChangeset
for help on using the changeset viewer.