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.
This commit is contained in:
Maxim Dounin 2014-01-04 03:32:10 +04:00
parent 1029607ac9
commit def37d254a

View File

@ -3656,7 +3656,7 @@ ngx_http_upstream_process_cache_control(ngx_http_request_t *r,
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;
}