We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm working on migrating from 1.3.0 to 1.4.0 (or 1.5.0) and I've discovered that 1.3.0 for the following snippet
router := gin.New() router.GET("/func/:id/details", func(c *gin.Context) { value := c.Param("id") fmt.Printf("value is %v\n", value) })
Would always get to the handler even when requesting /func//details (note the missing URL param) whereas 1.4.0 and above will return 404.
/func//details
1.4.0
404
Is it possible to control this behavior? (to work the same way as it worked in 1.3.0?)
1.3.0
Start below router
router := gin.New() router.GET("/func/:id/details", func(c *gin.Context) { value := c.Param("id") fmt.Printf("value is %v\n", value) }) router.Run("localhost:8080")
And make the following request with curl
curl
curl -i localhost:8080/func//details
HTTP 200 (get inside the handler)
HTTP 200
HTTP 404
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I'm working on migrating from 1.3.0 to 1.4.0 (or 1.5.0) and I've discovered that 1.3.0 for the following snippet
Would always get to the handler even when requesting
/func//details
(note the missing URL param) whereas1.4.0
and above will return404
.Is it possible to control this behavior? (to work the same way as it worked in
1.3.0
?)How to reproduce
Start below router
And make the following request with
curl
Expectations
HTTP 200
(get inside the handler)Actual result
HTTP 404
Environment
1.3.0
The text was updated successfully, but these errors were encountered: