# HG changeset patch # User Igor Sysoev # Date 1314882235 0 # Node ID 8d70904b6c48341239f0e16e87b4dca8fc92f782 # Parent 82738a316a54099fa925fa963c87e3f722c658a4 Now if client requests more ranges than "max_ranges" permits, nginx disables ranges and returns just the source response. diff -r 82738a316a54 -r 8d70904b6c48 src/http/modules/ngx_http_range_filter_module.c --- a/src/http/modules/ngx_http_range_filter_module.c Wed Aug 31 09:40:55 2011 +0000 +++ b/src/http/modules/ngx_http_range_filter_module.c Thu Sep 01 13:03:55 2011 +0000 @@ -323,8 +323,8 @@ size += end - start; - if (--ranges == 0) { - break; + if (ranges-- == 0) { + return NGX_DECLINED; } }