fix url rawPath

pull/511/head
xiaochun135468 5 years ago
parent 9d67573417
commit 839a3b734e
  1. 4
      pkg/net/http/blademaster/server.go

@ -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)

Loading…
Cancel
Save