1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-22 20:37:05 +00:00

fix #1531 and introduce the 'Configuration.ResetOnFireErrorCode' (read HISTORY.md)

Former-commit-id: 84f1e894378a6dfd94e0bf057f4037e35aee0c4f
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-06-08 05:16:55 +03:00
parent 34d0d98130
commit 7bb2223226
20 changed files with 333 additions and 260 deletions

View File

@@ -59,8 +59,12 @@ type Application interface {
// Look core/router/APIBuilder#GetRoutes for more.
GetRoutesReadOnly() []RouteReadOnly
// FireErrorCode executes an error http status code handler
// based on the context's status code.
// FireErrorCode handles the response's error response.
// If `Configuration.ResetOnFireErrorCode()` is true
// and the response writer was a recorder or a gzip writer one
// then it will try to reset the headers and the body before calling the
// registered (or default) error handler for that error code set by
// `ctx.StatusCode` method.
FireErrorCode(ctx Context)
// RouteExists reports whether a particular route exists