[wp-trac] [WordPress Trac] #38976: REST API: Allow multiple leading slashes at the beginning of the endpoint path

WordPress Trac noreply at wordpress.org
Tue Nov 29 16:36:50 UTC 2016


#38976: REST API: Allow multiple leading slashes at the beginning of the endpoint
path
--------------------------+--------------------
 Reporter:  jnylen0       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7
Component:  REST API      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+--------------------

Comment (by jnylen0):

 Under other permalink structures, it looks like this change will still fix
 things without breaking other things.

 === Plain permalinks

 The console sends `/?rest_route=//wp/v2/posts` which fails unless this
 change is made.

 === PATHINFO permalinks

 Permalink structure: `/index.php/%year%/%monthnum%/%day%/%postname%/`

 The console sends `/index.php/wp-json//wp/v2/posts` which works fine
 either way.

 The `rest_route` query var is correctly `/wp/v2/posts` before this change;
 I'm not sure if this is because of my server or WP internals.

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


More information about the wp-trac mailing list