From 15c27c712d15bfde4fa363cff6b60d22e5244d08 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Thu, 17 Jul 2014 02:07:18 +0200 Subject: [PATCH] Adds HEAD method in Static file serving --- gin.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gin.go b/gin.go index cab00e9..0778197 100644 --- a/gin.go +++ b/gin.go @@ -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 {