Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 22 months ago

#51636 closed defect (bug) (fixed)

REST API: Remove trailing slashes when preloading requests

Reported by: swissspidy Owned by: antonvlasenko
Priority: normal Milestone: 5.9
Component: REST API Version: 5.0
Severity: normal Keywords: good-first-bug has-patch has-unit-tests
Cc: Focuses: rest-api

Description

Other than rest_api_loaded, rest_preload_api_request does not currently remove trailing slashes from the requested path.

For consistency, let's call untrailingslashit() there as well.

Change History (10)

#1 @swissspidy
5 years ago

  • Focuses rest-api added

This ticket was mentioned in Slack in #core-restapi by swissspidy. View the logs.


5 years ago

#3 @TimothyBlynJacobs
5 years ago

  • Keywords good-first-bug added
  • Milestone Awaiting Review5.9

Makes sense to me! This should probably happen right before $path is passed to $path_parts = parse_url( $path ).

#4 @antonvlasenko
5 years ago

I would like to start working on this issue.

#5 @andraganescu
5 years ago

  • Owner set to @…
  • Status newassigned

#6 @andraganescu
5 years ago

  • Owner changed from @… to antonvlasenko

This ticket was mentioned in PR #1596 on WordPress/wordpress-develop by anton-vlasenko.


5 years ago
#7

  • Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed

#8 @azaozz
5 years ago

  • Resolutionfixed
  • Status assignedclosed

In 51648:

REST API: Remove trailing slashes when preloading requests and add unit tests for it.

Props antonvlasenko.
Fixes #51636.

anton-vlasenko commented on PR #1596:


5 years ago
#9

Closing this PR because the corresponding trac ticket is closed as fixed.

#10 @swissspidy
22 months ago

In 59457:

REST API: Remove trailing slashes when preloading requests and there is a query string.

Follow-up to [51648], see #51636.

Props antonvlasenko, swissspidy, spacedmonkey.
Fixes #57048.

Note: See TracTickets for help on using tickets.