From 09be2f18c55ac403cbc9103f47ea5e5c9e8604fa Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 1 Sep 2011 13:03:55 +0000 Subject: [PATCH] Now if client requests more ranges than "max_ranges" permits, nginx disables ranges and returns just the source response. --- src/http/modules/ngx_http_range_filter_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c index 2d7c1c230..02d2bf925 100644 --- a/src/http/modules/ngx_http_range_filter_module.c +++ b/src/http/modules/ngx_http_range_filter_module.c @@ -323,8 +323,8 @@ ngx_http_range_parse(ngx_http_request_t *r, ngx_http_range_filter_ctx_t *ctx, size += end - start; - if (--ranges == 0) { - break; + if (ranges-- == 0) { + return NGX_DECLINED; } }