mirror of
https://github.com/astaxie/beego.git
synced 2025-07-06 06:10:18 +00:00
beego/context: Fix ignored Header in case SetStatus has been called before
This commit is contained in:
@ -762,6 +762,11 @@ Admin:
|
||||
Info("beego:" + r.URL.Path + " 404" + " +" + timeend.String())
|
||||
}
|
||||
}
|
||||
|
||||
// Call WriteHeader if status code has been set changed
|
||||
if context.Output.Status != 0 {
|
||||
w.writer.WriteHeader(context.Output.Status)
|
||||
}
|
||||
}
|
||||
|
||||
func (p *ControllerRegistor) recoverPanic(rw http.ResponseWriter, r *http.Request) {
|
||||
|
Reference in New Issue
Block a user