# HG changeset patch # User Igor Sysoev # Date 1265039805 0 # Node ID 14b70eb95c536c07b915ef8dfb2c3b0c72f526c5 # Parent f419516d8e6ede8899cdb34a819ee623bde0b99d merge r3406: fix negative time in "Cache-Control" if "expires modified" sets time in the past diff --git a/src/http/modules/ngx_http_headers_filter_module.c b/src/http/modules/ngx_http_headers_filter_module.c --- a/src/http/modules/ngx_http_headers_filter_module.c +++ b/src/http/modules/ngx_http_headers_filter_module.c @@ -291,7 +291,7 @@ ngx_http_set_expires(ngx_http_request_t 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";