1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-24 03:46:37 +02:00

fix url rawPath

This commit is contained in:
xiaochun135468 2020-02-26 11:41:46 +08:00
parent 9d67573417
commit 839a3b734e

View File

@ -245,8 +245,8 @@ func (engine *Engine) prepareHandler(c *Context) {
httpMethod := c.Request.Method
rPath := c.Request.URL.Path
unescape := false
if engine.UseRawPath && len(c.Request.URL.RawPath) > 0 {
rPath = c.Request.URL.RawPath
if engine.UseRawPath && len(c.Request.URL.EscapedPath()) > 0 {
rPath = c.Request.URL.EscapedPath()
unescape = engine.UnescapePathValues
}
rPath = cleanPath(rPath)