1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-10 00:29:01 +02:00

Merge pull request #511 from zhengxuzhang/master

fix url rawPath
This commit is contained in:
Terry.Mao 2020-03-28 16:23:07 +08:00 committed by GitHub
commit 5a3f4b95d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,8 +244,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)