X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..8ab4a4532479e8db471032b51042ec8c4716d091:/wp-includes/class-IXR.php diff --git a/wp-includes/class-IXR.php b/wp-includes/class-IXR.php index 91b65e96..5930f562 100644 --- a/wp-includes/class-IXR.php +++ b/wp-includes/class-IXR.php @@ -402,7 +402,11 @@ class IXR_Server { if (!$data) { if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') { - header('Content-Type: text/plain'); // merged from WP #9093 + if ( function_exists( 'status_header' ) ) { + status_header( 405 ); // WP #20986 + header( 'Allow: POST' ); + } + header('Content-Type: text/plain'); // merged from WP #9093 die('XML-RPC server accepts POST requests only.'); }