diff options
Diffstat (limited to 'src/supplemental/http/server.c')
| -rw-r--r-- | src/supplemental/http/server.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/supplemental/http/server.c b/src/supplemental/http/server.c index 64ed9e11..cce73765 100644 --- a/src/supplemental/http/server.c +++ b/src/supplemental/http/server.c @@ -1,6 +1,6 @@ // -// Copyright 2017 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2017 Capitar IT Group BV <info@capitar.com> +// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -298,6 +298,11 @@ http_sconn_error(http_sconn *sc, uint16_t err) return; } + if (sc->close) { + if (nni_http_res_set_header(res, "Connection", "close") != 0) { + http_sconn_close(sc); + } + } sc->res = res; nni_http_write_res(sc->http, res, sc->txaio); } |
