Skip to content

fix: Rest param segment not matching optional segment#63

Closed
rschristian wants to merge 2 commits intomainfrom
fix/rest-match-wildcard
Closed

fix: Rest param segment not matching optional segment#63
rschristian wants to merge 2 commits intomainfrom
fix/rest-match-wildcard

Conversation

@rschristian
Copy link
Member

Basically we split the URL into segments, iterating over each segment to test if it matches a given param. Despite * meaning "0 or more", we were checking that it actually existed as a segment in the provided URL.

Imagine the URL /movies & the path /movies/*:

  • The first segment (movies) has a value & matches the pattern
  • There is no second segment so the && val check fails

A few people have reported issues with the nesting routers over the past few months but no one has been able to provide a reproduction; I'm guessing this is the root behind all of them. Cheers to @sbesh91 for finding this.

@rschristian rschristian marked this pull request as draft February 10, 2025 06:05
@rschristian
Copy link
Member Author

Actually, this now rings a bell and might be intentional.. Need to reread my notes

@rschristian
Copy link
Member Author

On nope, we've already been over this with #27. Working as intended

@rschristian rschristian deleted the fix/rest-match-wildcard branch February 10, 2025 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant