summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_h1proto.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2018-09-28 17:32:02 +0300
committerIgor Sysoev <igor@sysoev.ru>2018-09-28 17:32:02 +0300
commitb5d4fc939edca5ea5858b66d5fcf789b660df243 (patch)
tree407c4bc003e6b68f9a6c7856cfa2320d59e33438 /src/nxt_h1proto.c
parent92da8dae1e4194698ace12e6a51df5d9431e00c4 (diff)
downloadunit-b5d4fc939edca5ea5858b66d5fcf789b660df243.tar.gz
unit-b5d4fc939edca5ea5858b66d5fcf789b660df243.tar.bz2
Disabled chunked transfer encoding for 204 responses.
Diffstat (limited to 'src/nxt_h1proto.c')
-rw-r--r--src/nxt_h1proto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index 3e5044b7..70d6e5d8 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -967,7 +967,8 @@ nxt_h1p_request_header_send(nxt_task_t *task, nxt_http_request_t *r)
http11 = (h1p->parser.version.s.minor != '0');
if (r->resp.content_length == NULL || r->resp.content_length->skip) {
- if (http11) {
+
+ if (http11 && n != NXT_HTTP_NO_CONTENT) {
h1p->chunked = 1;
size += nxt_length(chunked);
/* Trailing CRLF will be added by the first chunk header. */