diff --git a/engine/fasthttp/url.go b/engine/fasthttp/url.go index d0726595..177b08aa 100644 --- a/engine/fasthttp/url.go +++ b/engine/fasthttp/url.go @@ -13,7 +13,7 @@ type ( // Path implements `engine.URL#Path` function. func (u *URL) Path() string { - return string(u.URI.Path()) + return string(u.URI.PathOriginal()) } // SetPath implements `engine.URL#SetPath` function. diff --git a/engine/standard/url.go b/engine/standard/url.go index e68f5def..9c436e95 100644 --- a/engine/standard/url.go +++ b/engine/standard/url.go @@ -12,7 +12,7 @@ type ( // Path implements `engine.URL#Path` function. func (u *URL) Path() string { - return u.URL.Path + return u.URL.EscapedPath() } // SetPath implements `engine.URL#SetPath` function.