Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 7093:acc2cddc7b45
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 23 Aug 2017 19:20:06 +0300 |
parents | 2a288909abc6 |
children | 46ddff109e72 |
comparison
equal
deleted
inserted
replaced
7092:2e8de3d81783 | 7093:acc2cddc7b45 |
---|---|
4388 ngx_http_upstream_t *u; | 4388 ngx_http_upstream_t *u; |
4389 | 4389 |
4390 u = r->upstream; | 4390 u = r->upstream; |
4391 | 4391 |
4392 u->headers_in.last_modified = h; | 4392 u->headers_in.last_modified = h; |
4393 | 4393 u->headers_in.last_modified_time = ngx_parse_http_time(h->value.data, |
4394 #if (NGX_HTTP_CACHE) | 4394 h->value.len); |
4395 | |
4396 if (u->cacheable) { | |
4397 u->headers_in.last_modified_time = ngx_parse_http_time(h->value.data, | |
4398 h->value.len); | |
4399 } | |
4400 | |
4401 #endif | |
4402 | 4395 |
4403 return NGX_OK; | 4396 return NGX_OK; |
4404 } | 4397 } |
4405 | 4398 |
4406 | 4399 |
4938 } | 4931 } |
4939 | 4932 |
4940 *ho = *h; | 4933 *ho = *h; |
4941 | 4934 |
4942 r->headers_out.last_modified = ho; | 4935 r->headers_out.last_modified = ho; |
4943 | 4936 r->headers_out.last_modified_time = |
4944 #if (NGX_HTTP_CACHE) | |
4945 | |
4946 if (r->upstream->cacheable) { | |
4947 r->headers_out.last_modified_time = | |
4948 r->upstream->headers_in.last_modified_time; | 4937 r->upstream->headers_in.last_modified_time; |
4949 } | |
4950 | |
4951 #endif | |
4952 | 4938 |
4953 return NGX_OK; | 4939 return NGX_OK; |
4954 } | 4940 } |
4955 | 4941 |
4956 | 4942 |