summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-12-25 15:00:08 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-12-25 15:00:08 +0000
commit1651542b3ad80440378674204fba9af6e0092637 (patch)
treeca2dd2bdaf62c802f697deaaa049eb2477eb02cc /src
parent9a5eabc4ac28ec90537dcd27f348738a19d199e1 (diff)
downloadnginx-1651542b3ad80440378674204fba9af6e0092637.tar.gz
nginx-1651542b3ad80440378674204fba9af6e0092637.tar.bz2
fix negative time in "Cache-Control" if "expires modified" sets time in the past
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_headers_filter_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_headers_filter_module.c b/src/http/modules/ngx_http_headers_filter_module.c
index 3b5ebd68f..fb6c0050e 100644
--- 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 *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";