mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
Upstream: unconditional parsing of last_modified_time.
This fixes at least the following cases, where no last_modified_time (assuming caching is not enabled) resulted in incorrect behaviour: - slice filter and If-Range requests (ticket #1357); - If-Range requests with proxy_force_ranges; - expires modified.
This commit is contained in:
parent
ed0cc4d523
commit
6a2e409833
@ -4390,15 +4390,8 @@ ngx_http_upstream_process_last_modified(ngx_http_request_t *r,
|
|||||||
u = r->upstream;
|
u = r->upstream;
|
||||||
|
|
||||||
u->headers_in.last_modified = h;
|
u->headers_in.last_modified = h;
|
||||||
|
u->headers_in.last_modified_time = ngx_parse_http_time(h->value.data,
|
||||||
#if (NGX_HTTP_CACHE)
|
h->value.len);
|
||||||
|
|
||||||
if (u->cacheable) {
|
|
||||||
u->headers_in.last_modified_time = ngx_parse_http_time(h->value.data,
|
|
||||||
h->value.len);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
@ -4940,15 +4933,8 @@ ngx_http_upstream_copy_last_modified(ngx_http_request_t *r, ngx_table_elt_t *h,
|
|||||||
*ho = *h;
|
*ho = *h;
|
||||||
|
|
||||||
r->headers_out.last_modified = ho;
|
r->headers_out.last_modified = ho;
|
||||||
|
r->headers_out.last_modified_time =
|
||||||
#if (NGX_HTTP_CACHE)
|
|
||||||
|
|
||||||
if (r->upstream->cacheable) {
|
|
||||||
r->headers_out.last_modified_time =
|
|
||||||
r->upstream->headers_in.last_modified_time;
|
r->upstream->headers_in.last_modified_time;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user