Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years 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 (9)

#1 @swissspidy
3 years ago

  • Focuses rest-api added

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


3 years ago

#3 @TimothyBlynJacobs
3 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
3 years ago

I would like to start working on this issue.

#5 @andraganescu
3 years ago

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

#6 @andraganescu
3 years ago

  • Owner changed from @… to antonvlasenko

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


3 years ago
#7

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

#8 @azaozz
3 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:


3 years ago
#9

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

Note: See TracTickets for help on using tickets.