1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

implement #1536 with (SetRegisterRule(iris.RouteOverlap))

Former-commit-id: 2b5523ff3e2aab60dd83faa3c520b16a34916fbe
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-06-14 08:09:42 +03:00
parent 78a45163e3
commit ed5964716b
16 changed files with 210 additions and 24 deletions

View File

@@ -139,11 +139,15 @@ func (w *ResponseRecorder) ClearHeaders() {
}
}
// Reset resets the response body, headers and the status code header.
func (w *ResponseRecorder) Reset() {
// Reset clears headers, sets the status code to 200
// and clears the cached body.
//
// Implements the `ResponseWriterReseter`.
func (w *ResponseRecorder) Reset() bool {
w.ClearHeaders()
w.WriteHeader(defaultStatusCode)
w.ResetBody()
return true
}
// FlushResponse the full body, headers and status code to the underline response writer