Closed wodim closed 5 years ago
https://github.com/gin-gonic/gin/issues/1301 , so it's not allowed
Wow, that is terrible.
expected, thanks! you should re-write your route.
Saying it's "expected" makes it double terrible, because it means you will never get around to fix it.
There is no way Gin should confuse Bleble with Blibli: Bleble has two slashes, and Blibli has three!
In the end I had to write my own router like this:
router.GET("/", ViewHome)
router.GET("/:first", ViewRouterOne)
router.GET("/:first/:second", ViewRouterTwo)
router.GET("/:first/:second/:third", ViewRouterThree)
router.GET("/:first/:second/:third/:fourth", ViewRouterFour)
Then from those functions you can redirect requests to the correct view functions. I hope this is useful to someone.
how this routes cause conflict
pGroup.POST("/fork", controllers.Fork)
pGroup.POST("/:id/process", controllers.processN)
Am I the only one who doesn't understand why something so basic is not implemented in gin?
Am I the only one who doesn't understand why something so basic is not implemented in gin?
me either,such basic functional route supported by most http server in the world but not in gin therefore,I have to rewrite the old openapi spec to make path can work with gin
How can i fix this? Where should i start to contribute to fix this?
How can i fix this? Where should i start to contribute to fix this?
It's httprouter's problem that gin currently based on checkout this issue https://github.com/gin-gonic/gin/issues/2016
is this limitation still persist now?
Wow! Gin routing pattern matching is a mess. Now I have to refactor my app to use another framework.
@appleboy
Member appleboy commented on Apr 8, 2021
bump to v1.7.0 version. See https://github.com/gin-gonic/gin/releases/tag/v1.7.0
Fix!!
@shivamganwani Thank you for classifying.
panic: wildcard route ':different' conflicts with existing children in path '/:something/:different/:again'
Am I doing something wrong or is this simply not allowed?