Go: Forced WriteHeader after application request processing.
Application should create response for every request. If not, Unit package will do it.
This commit is contained in:
@@ -46,6 +46,10 @@ func (r *request) response() *response {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *request) done() {
|
func (r *request) done() {
|
||||||
|
resp := r.response()
|
||||||
|
if !resp.headerSent {
|
||||||
|
resp.WriteHeader(http.StatusOK)
|
||||||
|
}
|
||||||
C.nxt_go_request_done(r.c_req)
|
C.nxt_go_request_done(r.c_req)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user