[wp-trac] [WordPress Trac] #39150: Empty JSON Payload Causes rest_invalid_json
WordPress Trac
noreply at wordpress.org
Fri Dec 16 05:42:25 UTC 2016
#39150: Empty JSON Payload Causes rest_invalid_json
-------------------------------------------------+-------------------------
Reporter: GamerZ | Owner: jnylen0
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.7.1
Component: REST API | Version: 4.7
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
fixed-major |
-------------------------------------------------+-------------------------
Changes (by dd32):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"39609"]:
{{{
#!CommitTicketReference repository="" revision="39609"
REST API: Do not error on empty JSON body
It's fairly common for clients to send `Content-Type: application/json`
with an
empty body. While technically not valid JSON, we've historically
supported
this behaviour, so it shouldn't cause an error.
Props JPry, jnylen0.
Merges [39594] to the 4.7 branch.
Fixes #39150.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39150#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list