From 8934afee242c1f9e33a46f4347c0a0c773590db0 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Fri, 6 Apr 2018 16:27:46 +0300 Subject: Go: Forced WriteHeader after application request processing. Application should create response for every request. If not, Unit package will do it. --- src/go/unit/request.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/go/unit/request.go b/src/go/unit/request.go index 4a839bdb..3d313ce2 100644 --- a/src/go/unit/request.go +++ b/src/go/unit/request.go @@ -46,6 +46,10 @@ func (r *request) response() *response { } func (r *request) done() { + resp := r.response() + if !resp.headerSent { + resp.WriteHeader(http.StatusOK) + } C.nxt_go_request_done(r.c_req) } -- cgit