changeset 4063:8d70904b6c48

Now if client requests more ranges than "max_ranges" permits, nginx disables ranges and returns just the source response.
author Igor Sysoev <igor@sysoev.ru>
date Thu, 01 Sep 2011 13:03:55 +0000
parents 82738a316a54
children 5b776ad53c3c
files src/http/modules/ngx_http_range_filter_module.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 
 
             size += end - start;
 
-            if (--ranges == 0) {
-                break;
+            if (ranges-- == 0) {
+                return NGX_DECLINED;
             }
         }