diff options
author | Max Romanov <max.romanov@nginx.com> | 2018-04-06 16:27:46 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2018-04-06 16:27:46 +0300 |
commit | 8934afee242c1f9e33a46f4347c0a0c773590db0 (patch) | |
tree | 4ee317467ed45c2413fdbf7111ab2880cedda399 | |
parent | f6c3ef7ed3efd6f63ef55a117fe475bd369d248b (diff) | |
download | unit-8934afee242c1f9e33a46f4347c0a0c773590db0.tar.gz unit-8934afee242c1f9e33a46f4347c0a0c773590db0.tar.bz2 |
Go: Forced WriteHeader after application request processing.
Application should create response for every request.
If not, Unit package will do it.
Diffstat (limited to '')
-rw-r--r-- | src/go/unit/request.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) } |