diff options
author | Roman Arutyunyan <arut@nginx.com> | 2020-08-18 16:22:00 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2020-08-18 16:22:00 +0300 |
commit | fd6df645ebf2de0ba7bcd8df2dfd7337f5ab516f (patch) | |
tree | e80276b4b7c41ed0d6c4f960064d59f50d7ddb62 /src/http/ngx_http_request.c | |
parent | ff1941d6ddb014da8b085c7ca9ba1098b4ec35a5 (diff) | |
parent | b2d09a4cdd865a8997f68fbaa1e928f0dc0b6ef0 (diff) | |
download | nginx-fd6df645ebf2de0ba7bcd8df2dfd7337f5ab516f.tar.gz nginx-fd6df645ebf2de0ba7bcd8df2dfd7337f5ab516f.zip |
Merged with the default branch.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 30a22fa22..7dbbcceb2 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1723,6 +1723,12 @@ ngx_http_alloc_large_header_buffer(ngx_http_request_t *r, ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http large header copy: %uz", r->header_in->pos - old); + if (r->header_in->pos - old > b->end - b->start) { + ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, + "too large header to copy"); + return NGX_ERROR; + } + new = b->start; ngx_memcpy(new, old, r->header_in->pos - old); @@ -3120,6 +3126,12 @@ closed: rev->error = 1; } +#if (NGX_HTTP_SSL) + if (c->ssl) { + c->ssl->no_send_shutdown = 1; + } +#endif + ngx_log_error(NGX_LOG_INFO, c->log, err, "client prematurely closed connection"); |