# HG changeset patch # User Igor Sysoev # Date 1314714335 0 # Node ID cc72e622941639b68428cc300770350608292fa9 # Parent d32a2000b766698d9fe36cc0d90d602ca915027b Unsatisfiable range with start value greater than content length was not properly skipped. The bug has been introduced in r4057. diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c --- 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; }