diff options
| author | Sergey Kandaurov <pluknet@nginx.com> | 2021-02-17 14:48:35 +0300 |
|---|---|---|
| committer | Sergey Kandaurov <pluknet@nginx.com> | 2021-02-17 14:48:35 +0300 |
| commit | 8ca2f73073da431d8e747589eac5b49a7c0faa5b (patch) | |
| tree | 6d5f46eb2dccc4cacc13a3e353f78f940f310bbb /src/http/modules | |
| parent | b93b056261114022b08f11413f959d3af687b7a7 (diff) | |
| parent | 949c97007b9c6010e958c36653e33c3f5bf34540 (diff) | |
| download | nginx-8ca2f73073da431d8e747589eac5b49a7c0faa5b.tar.gz nginx-8ca2f73073da431d8e747589eac5b49a7c0faa5b.tar.bz2 | |
Merged with the default branch.
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 7 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_stub_status_module.c | 10 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 3d8768af6..77a1e0d7f 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -2334,6 +2334,13 @@ ngx_http_proxy_non_buffered_copy_filter(void *data, ssize_t bytes) 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; } diff --git a/src/http/modules/ngx_http_stub_status_module.c b/src/http/modules/ngx_http_stub_status_module.c index 9bdf88129..db68b768a 100644 --- a/src/http/modules/ngx_http_stub_status_module.c +++ b/src/http/modules/ngx_http_stub_status_module.c @@ -103,16 +103,6 @@ ngx_http_stub_status_handler(ngx_http_request_t *r) ngx_str_set(&r->headers_out.content_type, "text/plain"); r->headers_out.content_type_lowcase = NULL; - if (r->method == NGX_HTTP_HEAD) { - r->headers_out.status = NGX_HTTP_OK; - - rc = ngx_http_send_header(r); - - if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { - return rc; - } - } - size = sizeof("Active connections: \n") + NGX_ATOMIC_T_LEN + sizeof("server accepts handled requests\n") - 1 + 6 + 3 * NGX_ATOMIC_T_LEN |
