Browse Source

Range filter: avoid negative range start.

Suffix ranges no longer allowed to set negative start values, to prevent
ranges with negative start from appearing even if total size protection
will be removed.
pull/910/head
Zuxi Wang 8 years ago
parent
commit
2fc738c721
  1. 2
      src/http/modules/ngx_http_range_filter_module.c

2
src/http/modules/ngx_http_range_filter_module.c

@ -342,7 +342,7 @@ ngx_http_range_parse(ngx_http_request_t *r, ngx_http_range_filter_ctx_t *ctx,
}
if (suffix) {
start = content_length - end;
start = (end < content_length) ? content_length - end : 0;
end = content_length - 1;
}

Loading…
Cancel
Save