summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/macaron.v1/router.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/macaron.v1/router.go')
-rw-r--r--vendor/gopkg.in/macaron.v1/router.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/gopkg.in/macaron.v1/router.go b/vendor/gopkg.in/macaron.v1/router.go
index f9b421a330..befa55f476 100644
--- a/vendor/gopkg.in/macaron.v1/router.go
+++ b/vendor/gopkg.in/macaron.v1/router.go
@@ -258,7 +258,9 @@ func (r *Router) NotFound(handlers ...Handler) {
validateHandlers(handlers)
r.notFound = func(rw http.ResponseWriter, req *http.Request) {
c := r.m.createContext(rw, req)
- c.handlers = append(r.m.handlers, handlers...)
+ c.handlers = make([]Handler, 0, len(r.m.handlers)+len(handlers))
+ c.handlers = append(c.handlers, r.m.handlers...)
+ c.handlers = append(c.handlers, handlers...)
c.run()
}
}