Make WordPress Core

Opened 21 months ago

Last modified 15 months ago

#45933 closed defect (bug)

WSODs protection returns incorrect content type — at Initial Version

Reported by: spacedmonkey Owned by:
Milestone: 5.1 Priority: normal
Severity: normal Version: 5.1
Component: Site Health Keywords: servehappy has-patch
Focuses: multisite Cc:


While testing WSODs protection ( #44458 ), I noticed that on REST API calls and RSS feeds, that wrong content type is returned. The REST API expects valid json to be returned. Other invalid rest requests, return an error state in the following format.

    code: "rest_no_route",
    message: "No route was found matching the URL and request method",
    data: {
       status: 404

As for RSS feeds, what is returned is not valid XML and will likely break most feed readers that are parsing them.

This issue is that wp_die, has go handles for, admin ajax, xmlrpc and html responses. But doesn't check for feed or rest api rests.

Change History (0)

Note: See TracTickets for help on using tickets.