gin-gonic / gin

Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
https://gin-gonic.com/
MIT License
79.05k stars 8.03k forks source link

[Bug] c.FullPath returns incorrect output! #2564

Open fwhezfwhez opened 4 years ago

fwhezfwhez commented 4 years ago

Description

c.FullPath() output incorrect relative path

How to reproduce

func HTTPRouter(r gin.IRouter) {
    r.GET("/fullpathadfaadfaf", func(c *gin.Context) {
        fmt.Println(c.FullPath())
    })
}

curl http://localhost:9112/local/api/fullpathadfaadfaf output:

/local/api/fk-exchange-shop-backup/          // this is another router

Environment

itcuihao commented 3 years ago

No recurrence.