[wp-trac] [WordPress Trac] #35975: OPTIONS request to REST API does not return correct Accept header

WordPress Trac noreply at wordpress.org
Thu Mar 3 09:54:34 UTC 2016


#35975: OPTIONS request to REST API does not return correct Accept header
--------------------------------------+-----------------------
 Reporter:  joehoyle                  |       Owner:  joehoyle
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  4.5
Component:  REST API                  |     Version:  4.4
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------
Changes (by joehoyle):

 * owner:   => joehoyle
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"36829"]:
 {{{
 #!CommitTicketReference repository="" revision="36829"
 OPTIONS requests to REST API should return Allow header.

 An OPTIONS request was incorrectly returning an "Accept" header which
 was a typo of "Allow". This meant Accept was showing "GET, POST" for
 example,
 however it was also not running the permission checks on the endpoints.

 Instead, the correct route needs to be set on the request object, which
 means
 the normal handling for the Allow header will kick in. This technically
 breaks backwards compatibility, however given the value of Accept was also
 wrong
 then this should not be an issue.

 Fixes #35975.
 }}}

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


More information about the wp-trac mailing list