summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-10-01 15:06:31 +0300
committerValentin Bartenev <vbart@nginx.com>2018-10-01 15:06:31 +0300
commit3c2eddb183684e577bca967543a52067edbda9a5 (patch)
tree3ac43a330bbad37e5296b82ed67709e1ca6b7aef /src
parente51ab1b2cbb10ef5a48d67ce7f492ddca481a5b7 (diff)
downloadunit-3c2eddb183684e577bca967543a52067edbda9a5.tar.gz
unit-3c2eddb183684e577bca967543a52067edbda9a5.tar.bz2
Allowing keep-alive connections after 204 responses.
This was unintentionally disabled by 7b5026a0bdeb.
Diffstat (limited to 'src')
-rw-r--r--src/nxt_h1proto.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index 70d6e5d8..ed159c93 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -968,11 +968,13 @@ nxt_h1p_request_header_send(nxt_task_t *task, nxt_http_request_t *r)
if (r->resp.content_length == NULL || r->resp.content_length->skip) {
- if (http11 && n != NXT_HTTP_NO_CONTENT) {
- h1p->chunked = 1;
- size += nxt_length(chunked);
- /* Trailing CRLF will be added by the first chunk header. */
- size -= nxt_length("\r\n");
+ if (http11) {
+ if (n != NXT_HTTP_NO_CONTENT) {
+ h1p->chunked = 1;
+ size += nxt_length(chunked);
+ /* Trailing CRLF will be added by the first chunk header. */
+ size -= nxt_length("\r\n");
+ }
} else {
h1p->keepalive = 0;