Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: Cache-Control preferred over Expires.

Maxim Dounin
January 03, 2014 06:50PM
details: http://hg.nginx.org/nginx/rev/6a3ab6fdd70f
branches:
changeset: 5500:6a3ab6fdd70f
user: Maxim Dounin <mdounin@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;
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream: Cache-Control preferred over Expires.

Maxim Dounin 621 January 03, 2014 06:50PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 135
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready