Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

router: fix slash path trimming #76

Merged
merged 3 commits into from Dec 1, 2021
Merged

router: fix slash path trimming #76

merged 3 commits into from Dec 1, 2021

Conversation

wuhan005
Copy link
Member

@wuhan005 wuhan005 commented Dec 1, 2021

Describe the pull request

Fix the wrong path trimming behavior, which makes route /{**: **} can get the correct parameter value when there is a slash at the end of the path.

Link to the issue: #75

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code.

@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

Merging #76 (9b24ba4) into main (7fd8347) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage   87.59%   87.59%           
=======================================
  Files          17       17           
  Lines        1129     1129           
=======================================
  Hits          989      989           
  Misses        101      101           
  Partials       39       39           

@wuhan005 wuhan005 requested a review from unknwon December 1, 2021 14:17
@wuhan005 wuhan005 linked an issue Dec 1, 2021 that may be closed by this pull request
1 task
Copy link
Member

@unknwon unknwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve to unblock, just one minor issue.

internal/route/tree_test.go Outdated Show resolved Hide resolved
@wuhan005 wuhan005 merged commit eaa7dfa into main Dec 1, 2021
@wuhan005 wuhan005 deleted the wh/fix-param-slash branch December 1, 2021 15:30
@unknwon
Copy link
Member

unknwon commented Dec 1, 2021

https://github.com/flamego/flamego/releases/tag/v1.0.1 has been tagged for this merge.

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.

router: {**: **} does not capture the trailing slash
2 participants