diff options
author | Ruslan Ermilov <ru@nginx.com> | 2019-08-13 15:43:36 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2019-08-13 15:43:36 +0300 |
commit | 94c5eb142e58a86f81eb1369fa6fcb96c2f23d6b (patch) | |
tree | 24fc01fb18b4b87b7e61fb422689d97da3caacca /src/http/v2/ngx_http_v2.c | |
parent | dbdd9ffea81d9db46fb88b5eba828f2ad080d388 (diff) |
HTTP/2: limited number of DATA frames.
Fixed excessive memory growth and CPU usage if stream windows are
manipulated in a way that results in generating many small DATA frames.
Fix is to limit the number of simultaneously allocated DATA frames.
Diffstat (limited to 'src/http/v2/ngx_http_v2.c')
-rw-r--r-- | src/http/v2/ngx_http_v2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c index 72d5aa508..88e2bb9fb 100644 --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -4369,6 +4369,8 @@ ngx_http_v2_close_stream(ngx_http_v2_stream_t *stream, ngx_int_t rc) */ pool = stream->pool; + h2c->frames -= stream->frames; + ngx_http_free_request(stream->request, rc); if (pool != h2c->state.pool) { |