WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/24/2021 02:17:36 AM (6 months ago)
Author:
peterwilsoncc
Message:

XML-RPC: Set HTTP status code in accordance with the spec.

When the XML-RPC endpoint is enabled, always return a HTTP 200 OK status code in accordance with the XML-RPC specification. Continue to return an HTTP 405 Method Not Allowed status code when the endpoint is disabled.

Props ariskataoka, johnbillion.
Fixes #52958.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/IXR/class-IXR-server.php

    r49862 r50954  
    130130            $error = new IXR_Error($error, $message);
    131131        }
    132 
    133         if ( function_exists( 'status_header' ) ) {
    134             status_header( $error->code );
    135         }
    136132
    137133        $this->output($error->getXml());
Note: See TracChangeset for help on using the changeset viewer.