[wp-trac] [WordPress Trac] #43691: class-wp-rest-server sends response body regardless of actual response code or result type

WordPress Trac noreply at wordpress.org
Thu Aug 15 19:55:23 UTC 2019


#43691: class-wp-rest-server sends response body regardless of actual response code
or result type
--------------------------------------+--------------------------------
 Reporter:  matthias.thiel            |       Owner:  TimothyBlynJacobs
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  5.3
Component:  REST API                  |     Version:  4.4
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+--------------------------------
Changes (by kadamwhite):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"45809" 45809]:
 {{{
 #!CommitTicketReference repository="" revision="45809"
 REST API: Do not send response body if status is 204 or body is null.

 Status code 204 should indicate no response body is sent. Previously, a
 "null" string was sent, which MacOS Safari would try to parse as JSON and
 thereby fail to complete the request.

 Props TimothyBlynJacobs, andizer, matthias.thiel.
 Fixes #43691.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43691#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list