aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-09-01 13:03:55 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-09-01 13:03:55 +0000
commit09be2f18c55ac403cbc9103f47ea5e5c9e8604fa (patch)
treeb2786a0a9a9174a20f3a69eeaee8f892aa9cb4e4
parentf560419c541b9bcc8d320cb866f0e46477f79b52 (diff)
downloadnginx-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.c4
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;
}
}