Now unsatisfiable ranges are processed according to RFC 2616.
diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c index c0a835c..6b45e2b 100644 --- a/src/http/modules/ngx_http_range_filter_module.c +++ b/src/http/modules/ngx_http_range_filter_module.c
@@ -264,7 +264,7 @@ } if (start >= r->headers_out.content_length_n) { - return NGX_HTTP_RANGE_NOT_SATISFIABLE; + goto skip; } while (*p == ' ') { p++; } @@ -299,14 +299,10 @@ } if (start > end) { - return NGX_HTTP_RANGE_NOT_SATISFIABLE; + goto skip; } if (end >= r->headers_out.content_length_n) { - /* - * Download Accelerator sends the last byte position - * that equals to the file length - */ end = r->headers_out.content_length_n; } else { @@ -325,11 +321,17 @@ size += end - start; + skip: + if (*p++ != ',') { break; } } + if (ctx->ranges.nelts == 0) { + return NGX_HTTP_RANGE_NOT_SATISFIABLE; + } + if (size > r->headers_out.content_length_n) { return NGX_DECLINED; }