diff src/http/ngx_http_upstream.c @ 8316:13f7085b90d2 quic

Merged with the default branch.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 17 Feb 2021 14:48:35 +0300
parents 279ad36f2f4b 83c4622053b0
children f1986657fc26
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -3741,6 +3741,13 @@ ngx_http_upstream_non_buffered_filter(vo
 
     u = r->upstream;
 
+    if (u->length == 0) {
+        ngx_log_error(NGX_LOG_WARN, r->connection->log, 0,
+                      "upstream sent more data than specified in "
+                      "\"Content-Length\" header");
+        return NGX_OK;
+    }
+
     for (cl = u->out_bufs, ll = &u->out_bufs; cl; cl = cl->next) {
         ll = &cl->next;
     }