WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 5 weeks ago

Last modified 5 weeks ago

#51636 closed defect (bug) (fixed)

REST API: Remove trailing slashes when preloading requests

Reported by: swissspidy Owned by: 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 (9)

#1 @swissspidy
2 months ago

  • Focuses rest-api added

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


2 months ago

#3 @TimothyBlynJacobs
2 months 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
6 weeks ago

I would like to start working on this issue.

#5 @andraganescu
6 weeks ago

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

#6 @andraganescu
6 weeks ago

  • Owner changed from @… to antonvlasenko

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


6 weeks ago

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

#8 @azaozz
5 weeks 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.

#9 @prbot
5 weeks ago

anton-vlasenko commented on PR #1596:

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

Note: See TracTickets for help on using tickets.