mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
merge r3406:
fix negative time in "Cache-Control" if "expires modified" sets time in the past
This commit is contained in:
parent
c76fa1de09
commit
d0abd9e4f8
@ -291,7 +291,7 @@ ngx_http_set_expires(ngx_http_request_t *r, ngx_http_headers_conf_t *conf)
|
||||
|
||||
ngx_http_time(expires->value.data, expires_time);
|
||||
|
||||
if (conf->expires_time < 0) {
|
||||
if (conf->expires_time < 0 || max_age < 0) {
|
||||
cc->value.len = sizeof("no-cache") - 1;
|
||||
cc->value.data = (u_char *) "no-cache";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user