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-- {