changeset 4059:cc72e6229416

Unsatisfiable range with start value greater than content length was not properly skipped. The bug has been introduced in r4057.
author Igor Sysoev <igor@sysoev.ru>
date Tue, 30 Aug 2011 14:25:35 +0000
parents d32a2000b766
children 45de8d258085
files src/http/modules/ngx_http_range_filter_module.c
diffstat 1 files changed, 1 insertions(+), 5 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
@@ -264,10 +264,6 @@ ngx_http_range_parse(ngx_http_request_t 
                 return NGX_HTTP_RANGE_NOT_SATISFIABLE;
             }
 
-            if (start >= content_length) {
-                goto skip;
-            }
-
             while (*p == ' ') { p++; }
 
             if (*p == ',' || *p == '\0') {
@@ -299,7 +295,7 @@ ngx_http_range_parse(ngx_http_request_t 
             end = content_length - 1;
         }
 
-        if (start > end) {
+        if (start >= content_length || start > end) {
             goto skip;
         }