From bd96cc3c15dbd1d4c321d4aa713285649288215f Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Tue, 6 Jun 2017 14:59:35 -0700 Subject: [PATCH] Fixed #947 Signed-off-by: Vishal Rana --- context.go | 5 ----- echo.go | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/context.go b/context.go index 242eec26..a1ee3e0d 100644 --- a/context.go +++ b/context.go @@ -494,11 +494,6 @@ func (c *context) Stream(code int, contentType string, r io.Reader) (err error) } func (c *context) File(file string) (err error) { - file, err = url.QueryUnescape(file) // Issue #839 - if err != nil { - return - } - f, err := os.Open(file) if err != nil { return ErrNotFound diff --git a/echo.go b/echo.go index baa92fde..6a6191d9 100644 --- a/echo.go +++ b/echo.go @@ -542,10 +542,7 @@ func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) { // Middleware h := func(c Context) error { method := r.Method - path := r.URL.RawPath - if path == "" { - path = r.URL.Path - } + path := r.URL.Path e.router.Find(method, path, c) h := c.Handler() for i := len(e.middleware) - 1; i >= 0; i-- {