From 6167586d8f069c7e4642b8bcd93445589fb03b61 Mon Sep 17 00:00:00 2001 From: Brendan Fosberry Date: Mon, 6 Apr 2015 14:26:16 -0500 Subject: [PATCH] Fixing bug with static pathing --- routergroup.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routergroup.go b/routergroup.go index c70bb34e..b2a04874 100644 --- a/routergroup.go +++ b/routergroup.go @@ -111,11 +111,11 @@ func (group *RouterGroup) UNLINK(relativePath string, handlers ...HandlerFunc) { func (group *RouterGroup) Static(relativePath, root string) { absolutePath := group.calculateAbsolutePath(relativePath) handler := group.createStaticHandler(absolutePath, root) - absolutePath = path.Join(absolutePath, "/*filepath") + relativePath = path.Join(relativePath, "/*filepath") // Register GET and HEAD handlers - group.GET(absolutePath, handler) - group.HEAD(absolutePath, handler) + group.GET(relativePath, handler) + group.HEAD(relativePath, handler) } func (group *RouterGroup) createStaticHandler(absolutePath, root string) func(*Context) {