1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 04:51:56 +00:00
Former-commit-id: 7b5d5530279789a3118190feb57776948b305662
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-06-07 21:07:08 +03:00
parent 9c92952a40
commit 7af5f139e0
40 changed files with 73 additions and 73 deletions

View File

@@ -26,7 +26,7 @@ func (ch *ErrorCodeHandler) Fire(ctx context.Context) {
// if we can reset the body
if w, ok := ctx.IsRecording(); ok {
if statusCodeSuccessful(w.StatusCode()) { // if not an error status code
w.WriteHeader(ch.StatusCode) // then set it manually here, otherwise it should be setted via ctx.StatusCode(...)
w.WriteHeader(ch.StatusCode) // then set it manually here, otherwise it should be set via ctx.StatusCode(...)
}
// reset if previous content and it's recorder, keep the status code.
w.ClearHeaders()