Mercurial > hg > nginx-quic
changeset 4741:5ea8c710c532
Fixed If-Range with unknown last modified time.
If modification time isn't known, skip range processing and return full
entity body instead of just ignoring If-Range. Ignoring If-Range isn't
safe as client will assume entity wasn't changed since time specified.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 07 Jul 2012 21:16:21 +0000 |
parents | 432428be692d |
children | 3cb5cf1e1439 |
files | src/http/modules/ngx_http_range_filter_module.c |
diffstat | 1 files changed, 5 insertions(+), 1 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 @@ -174,7 +174,11 @@ ngx_http_range_header_filter(ngx_http_re goto next_filter; } - if (r->headers_in.if_range && r->headers_out.last_modified_time != -1) { + if (r->headers_in.if_range) { + + if (r->headers_out.last_modified_time == (time_t) -1) { + goto next_filter; + } if_range = ngx_http_parse_time(r->headers_in.if_range->value.data, r->headers_in.if_range->value.len);