diff src/http/ngx_http_upstream.c @ 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 6d357b2a9d6e
children 17134d29782e
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;
     }