Fixing bug with static pathing

This commit is contained in:
Brendan Fosberry 2015-04-06 14:26:16 -05:00
parent c0e8cedc98
commit 6167586d8f
1 changed files with 3 additions and 3 deletions

View File

@ -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) {