diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_h1proto.c | 3 | ||||
-rw-r--r-- | src/nxt_http.h | 1 |
2 files changed, 3 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. */ diff --git a/src/nxt_http.h b/src/nxt_http.h index 1c7ed8bb..b2111f90 100644 --- a/src/nxt_http.h +++ b/src/nxt_http.h @@ -12,6 +12,7 @@ typedef enum { NXT_HTTP_INVALID = 0, NXT_HTTP_OK = 200, + NXT_HTTP_NO_CONTENT = 204, NXT_HTTP_MULTIPLE_CHOICES = 300, NXT_HTTP_MOVED_PERMANENTLY = 301, |