diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-09-01 13:03:55 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-09-01 13:03:55 +0000 |
commit | 09be2f18c55ac403cbc9103f47ea5e5c9e8604fa (patch) | |
tree | b2786a0a9a9174a20f3a69eeaee8f892aa9cb4e4 | |
parent | f560419c541b9bcc8d320cb866f0e46477f79b52 (diff) | |
download | nginx-09be2f18c55ac403cbc9103f47ea5e5c9e8604fa.tar.gz nginx-09be2f18c55ac403cbc9103f47ea5e5c9e8604fa.zip |
Now if client requests more ranges than "max_ranges" permits,
nginx disables ranges and returns just the source response.
-rw-r--r-- | src/http/modules/ngx_http_range_filter_module.c | 4 |
1 files 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; } } |