changeset 5500:6a3ab6fdd70f

Upstream: Cache-Control preferred over Expires. Not really a strict check (as X-Accel-Expires might be ignored or contain invalid value), but quite simple to implement and better than what we have now.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 04 Jan 2014 03:32:10 +0400
parents b91bcba29351
children 1cd23ca84a9b
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -3656,7 +3656,7 @@ ngx_http_upstream_process_cache_control(
         return NGX_OK;
     }
 
-    if (r->cache->valid_sec != 0) {
+    if (r->cache->valid_sec != 0 && u->headers_in.x_accel_expires != NULL) {
         return NGX_OK;
     }