1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-01 09:17:02 +00:00
Former-commit-id: 75b855bee9216c28ce8e1ff46aee467766c37f23
This commit is contained in:
kataras
2017-08-13 01:47:19 +03:00
parent 960ddb9f72
commit 39a24fb7cb
8 changed files with 111 additions and 27 deletions

View File

@@ -758,6 +758,19 @@ func Next(ctx Context) {
}
}
// Do calls the SetHandlers(handlers)
// and executes the first handler,
// handlers should not be empty.
//
// It's used by the router, developers may use that
// to replace and execute handlers immediately.
func Do(ctx Context, handlers Handlers) {
if len(handlers) > 0 {
ctx.SetHandlers(handlers)
handlers[0](ctx)
}
}
// LimitRequestBodySize is a middleware which sets a request body size limit
// for all next handlers in the chain.
var LimitRequestBodySize = func(maxRequestBodySizeBytes int64) Handler {