From 839a3b734eb0a045f0b507235044b79482d83ac0 Mon Sep 17 00:00:00 2001 From: xiaochun135468 <290380883@qq.com> Date: Wed, 26 Feb 2020 11:41:46 +0800 Subject: [PATCH] fix url rawPath --- pkg/net/http/blademaster/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/net/http/blademaster/server.go b/pkg/net/http/blademaster/server.go index 6fa12ac56..852df921d 100644 --- a/pkg/net/http/blademaster/server.go +++ b/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)