mirror of https://github.com/gin-gonic/gin.git
fix: fix URL path value still unescaped when UnescapePathValues set false
This commit is contained in:
parent
bf6728e53b
commit
6c7a318468
6
gin.go
6
gin.go
|
@ -645,10 +645,10 @@ func (engine *Engine) HandleContext(c *Context) {
|
|||
|
||||
func (engine *Engine) handleHTTPRequest(c *Context) {
|
||||
httpMethod := c.Request.Method
|
||||
rPath := c.Request.URL.EscapedPath()
|
||||
rPath := c.Request.URL.Path
|
||||
unescape := false
|
||||
if engine.UseRawPath && len(c.Request.URL.RawPath) > 0 {
|
||||
rPath = c.Request.URL.RawPath
|
||||
if engine.UseRawPath {
|
||||
rPath = c.Request.URL.EscapedPath()
|
||||
unescape = engine.UnescapePathValues
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue