summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2017-08-23 19:20:06 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2017-08-23 19:20:06 +0300
commit6a2e4098331077037cb9c197f88a54f46d870068 (patch)
tree6867dec9e3ce2502bce25b15393547dafab94e81 /src
parented0cc4d52308b75ab217724392994e6828af4fda (diff)
downloadnginx-6a2e4098331077037cb9c197f88a54f46d870068.tar.gz
nginx-6a2e4098331077037cb9c197f88a54f46d870068.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 6a2b32238..73a58824a 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -4390,15 +4390,8 @@ ngx_http_upstream_process_last_modified(ngx_http_request_t *r,
u = r->upstream;
u->headers_in.last_modified = h;
-
-#if (NGX_HTTP_CACHE)
-
- if (u->cacheable) {
- u->headers_in.last_modified_time = ngx_parse_http_time(h->value.data,
- h->value.len);
- }
-
-#endif
+ u->headers_in.last_modified_time = ngx_parse_http_time(h->value.data,
+ h->value.len);
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;
r->headers_out.last_modified = ho;
-
-#if (NGX_HTTP_CACHE)
-
- if (r->upstream->cacheable) {
- r->headers_out.last_modified_time =
+ r->headers_out.last_modified_time =
r->upstream->headers_in.last_modified_time;
- }
-
-#endif
return NGX_OK;
}