[wp-trac] [WordPress Trac] #45753: REST API: Allow header not set when OPTIONS request is made to a route that contains URL params

WordPress Trac noreply at wordpress.org
Tue Mar 19 03:21:34 UTC 2019


#45753: REST API: Allow header not set when OPTIONS request is made to a route that
contains URL params
-------------------------------------------------+-------------------------
 Reporter:  noisysocks                           |       Owner:  kadamwhite
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.2
Component:  REST API                             |     Version:  5.0.2
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-unit-tests has-patch needs-      |     Focuses:
  testing                                        |
-------------------------------------------------+-------------------------
Changes (by kadamwhite):

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


Comment:

 In [changeset:"44933" 44933]:
 {{{
 #!CommitTicketReference repository="" revision="44933"
 REST API: Ensure "Allow" header is returned for OPTIONS requests.

 This changeset ensures `$request->set_url_params()` is called while
 fulfilling OPTIONS requests, where previously it was skipped because
 OPTIONS requests short-circuit the logic in `dispatch` which handles this
 setup for other request methods. Omitting the URL parameters prevented the
 Allow header from being set.

 Props killua99, noisysocks.
 Fixes #45753.
 }}}

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


More information about the wp-trac mailing list