mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
parent
c3887ebb13
commit
bd96cc3c15
@ -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
|
||||
|
5
echo.go
5
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-- {
|
||||
|
Loading…
Reference in New Issue
Block a user