mirror of
https://github.com/kataras/iris.git
synced 2026-01-06 03:27:27 +00:00
add context#StatusCodeNotSuccessful for customize even the most customized clients that are not compatible with the standards and fix the SPA if static file serve handlers are passed as its AssetHandler as reported at the chat.iris-go.com
Former-commit-id: ccd0815a09b9305bfbeaad7b46559dd86f34f20b
This commit is contained in:
@@ -189,7 +189,7 @@ func (w *ResponseRecorder) WriteTo(res ResponseWriter) {
|
||||
|
||||
if to, ok := res.(*ResponseRecorder); ok {
|
||||
|
||||
// set the status code, to is first ( probably an error >=400)
|
||||
// set the status code, to is first ( probably an error? (context.StatusCodeNotSuccessful, defaults to < 200 || >= 400).
|
||||
if statusCode := w.ResponseWriter.StatusCode(); statusCode == defaultStatusCode {
|
||||
to.WriteHeader(statusCode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user