mirror of
https://github.com/kataras/iris.git
synced 2026-01-01 09:17:02 +00:00
Document https://github.com/kataras/iris/issues/720 and fix https://github.com/kataras/iris/issues/719 for good
Former-commit-id: 75b855bee9216c28ce8e1ff46aee467766c37f23
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user