Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 6 months ago

#51636 closed defect (bug) (fixed)

REST API: Remove trailing slashes when preloading requests

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

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
4 years ago

  • Focuses rest-api added

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


4 years ago

#3 @TimothyBlynJacobs
4 years ago

  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to 5.9

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

#4 @antonvlasenko
4 years ago

I would like to start working on this issue.

#5 @andraganescu
4 years ago

  • Owner set to @…
  • Status changed from new to assigned

#6 @andraganescu
4 years ago

  • Owner changed from @… to antonvlasenko

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


4 years ago
#7

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

#8 @azaozz
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

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:


4 years ago
#9

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

#10 @swissspidy
6 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.