[nginx] Upstream: Cache-Control preferred over Expires.
Maxim Dounin
mdounin at mdounin.ru
Fri Jan 3 23:49:09 UTC 2014
details: http://hg.nginx.org/nginx/rev/6a3ab6fdd70f
branches:
changeset: 5500:6a3ab6fdd70f
user: Maxim Dounin <mdounin at mdounin.ru>
date: Sat Jan 04 03:32:10 2014 +0400
description:
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.
diffstat:
src/http/ngx_http_upstream.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- 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;
}
More information about the nginx-devel
mailing list