Merge pull request #511 from zhengxuzhang/master

fix url rawPath
pull/532/head
Terry.Mao 5 years ago committed by GitHub
commit 5a3f4b95d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      pkg/net/http/blademaster/server.go

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

Loading…
Cancel
Save