wp/wp-comments-post.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
     5  * @package WordPress
     5  * @package WordPress
     6  */
     6  */
     7 
     7 
     8 if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
     8 if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
     9 	$protocol = $_SERVER['SERVER_PROTOCOL'];
     9 	$protocol = $_SERVER['SERVER_PROTOCOL'];
    10 	if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ), true ) ) {
    10 	if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) {
    11 		$protocol = 'HTTP/1.0';
    11 		$protocol = 'HTTP/1.0';
    12 	}
    12 	}
    13 
    13 
    14 	header( 'Allow: POST' );
    14 	header( 'Allow: POST' );
    15 	header( "$protocol 405 Method Not Allowed" );
    15 	header( "$protocol 405 Method Not Allowed" );