1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-05 00:58:47 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-03-27 16:29:41 -07:00
parent d3e33ec4dd
commit a2d757eddc
4 changed files with 51 additions and 11 deletions

View File

@ -61,7 +61,7 @@ func StaticFromConfig(config StaticConfig) echo.MiddlewareFunc {
if fi.IsDir() {
/* NOTE:
Not checking the Last-Modified header as it caches the response `304` when
changing differnt directories for the same path.
changing different directories for the same path.
*/
d := f
@ -97,9 +97,8 @@ func StaticFromConfig(config StaticConfig) echo.MiddlewareFunc {
}
return next.Handle(c)
}
fi, _ = f.Stat() // Index file stat
}
return echo.ServeContent(c.Request(), c.Response(), f, fi)
return c.ServeContent(f)
})
}
}