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

fix: wrong when wildcard follows named param #2983

merged 6 commits into from Dec 12, 2021


Copy link

@jincheng9 jincheng9 commented Dec 9, 2021


  1. set route rule "/vendor/:x/*y"
  2. request via url "/vendor/x/", Gin returns 200. This is right.
  3. request via url "/vendor/x", Gin returns 404. Instead, it should redirect "/vendor/x" to match the rule "vendor/:x/*y"


This bug is fixed by the httprouter fix

@thinkerou please help review this PR. Thanks.

Copy link

codecov bot commented Dec 9, 2021

Codecov Report

Merging #2983 (c1f7be7) into master (e56d18f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2983   +/-   ##
  Coverage   98.60%   98.60%           
  Files          41       41           
  Lines        3084     3084           
  Hits         3041     3041           
  Misses         30       30           
  Partials       13       13           
Flag Coverage Δ
go-1.13 ∅ <ø> (∅)
go-1.14 ∅ <ø> (∅)
go-1.15 ∅ <ø> (∅)
go-1.16 98.60% <100.00%> (ø)
go-1.17 98.50% <100.00%> (ø)
macos-latest 98.60% <100.00%> (ø)
nomsgpack 98.58% <100.00%> (ø)
ubuntu-latest 98.60% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tree.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e56d18f...c1f7be7. Read the comment docs.

Copy link
Contributor Author

jincheng9 commented Dec 11, 2021

@appleboy @thinkerou Hi, please help review this PR. Thanks~

@thinkerou thinkerou requested review from thinkerou and appleboy Dec 11, 2021
@thinkerou thinkerou added this to the v1.8 milestone Dec 11, 2021
Copy link

@thinkerou thinkerou left a comment


Copy link
Contributor Author

jincheng9 commented Dec 12, 2021

@appleboy Plz help review this PR. Thanks.

@appleboy appleboy merged commit 7d18981 into gin-gonic:master Dec 12, 2021
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants