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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user