comparison src/http/modules/ngx_http_range_filter_module.c @ 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 85a1570ce960
children 4752060ca462
comparison
equal deleted inserted replaced
4740:432428be692d 4741:5ea8c710c532
172 != 0) 172 != 0)
173 { 173 {
174 goto next_filter; 174 goto next_filter;
175 } 175 }
176 176
177 if (r->headers_in.if_range && r->headers_out.last_modified_time != -1) { 177 if (r->headers_in.if_range) {
178
179 if (r->headers_out.last_modified_time == (time_t) -1) {
180 goto next_filter;
181 }
178 182
179 if_range = ngx_http_parse_time(r->headers_in.if_range->value.data, 183 if_range = ngx_http_parse_time(r->headers_in.if_range->value.data,
180 r->headers_in.if_range->value.len); 184 r->headers_in.if_range->value.len);
181 185
182 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 186 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,