Adds HEAD method in Static file serving

This commit is contained in:
Manu Mtz-Almeida 2014-07-17 02:07:18 +02:00
parent dda70bf382
commit 15c27c712d
1 changed files with 3 additions and 0 deletions

3
gin.go
View File

@ -210,6 +210,9 @@ func (group *RouterGroup) Static(p, root string) {
group.GET(p, func(c *Context) {
fileServer.ServeHTTP(c.Writer, c.Request)
})
group.HEAD(p, func(c *Context) {
fileServer.ServeHTTP(c.Writer, c.Request)
})
}
func (group *RouterGroup) combineHandlers(handlers []HandlerFunc) []HandlerFunc {