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
commitd54d806c52756ab65d61713589029627ffa72c5d (patch)
treeec5dfd6b39bade28174d72184a60a8788c7cc5a8 /src
parent3c2eddb183684e577bca967543a52067edbda9a5 (diff)
downloadunit-d54d806c52756ab65d61713589029627ffa72c5d.tar.gz
unit-d54d806c52756ab65d61713589029627ffa72c5d.tar.bz2
Disabled chunked transfer encoding for 304 responses as well.
According to RFC 7232: | A 304 response cannot contain a message-body; it is always terminated | by the first empty line after the header fields.
Diffstat (limited to 'src')
-rw-r--r--src/nxt_h1proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index ed159c93..2194e56f 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -969,7 +969,7 @@ 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) {
- if (n != NXT_HTTP_NO_CONTENT) {
+ if (n != NXT_HTTP_NOT_MODIFIED && n != NXT_HTTP_NO_CONTENT) {
h1p->chunked = 1;
size += nxt_length(chunked);
/* Trailing CRLF will be added by the first chunk header. */