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:
Max Romanov
2018-04-06 16:27:46 +03:00
parent f6c3ef7ed3
commit 8934afee24

View File

@@ -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)
} }