mirror of
https://github.com/labstack/echo.git
synced 2025-07-15 01:34:53 +02:00
Flexible handler and middleware
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
@ -17,14 +17,16 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func (r *response) WriteHeader(c int) {
|
||||
|
||||
func (r *response) WriteHeader(n int) {
|
||||
// TODO: fix when halted.
|
||||
if r.committed {
|
||||
// TODO: Warning
|
||||
log.Println("bolt: response already committed")
|
||||
return
|
||||
}
|
||||
r.status = c
|
||||
r.ResponseWriter.WriteHeader(c)
|
||||
r.status = n
|
||||
r.ResponseWriter.WriteHeader(n)
|
||||
r.committed = true
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user