Mercurial > hg > nginx
comparison src/http/modules/ngx_http_headers_filter_module.c @ 3405:6cc74c87c656
fix negative time in "Cache-Control" if "expires modified" sets time in the past
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 25 Dec 2009 15:00:08 +0000 |
parents | c7d57b539248 |
children | dd1570b6f237 |
comparison
equal
deleted
inserted
replaced
3404:2c07eba97f43 | 3405:6cc74c87c656 |
---|---|
289 max_age = expires_time - now; | 289 max_age = expires_time - now; |
290 } | 290 } |
291 | 291 |
292 ngx_http_time(expires->value.data, expires_time); | 292 ngx_http_time(expires->value.data, expires_time); |
293 | 293 |
294 if (conf->expires_time < 0) { | 294 if (conf->expires_time < 0 || max_age < 0) { |
295 cc->value.len = sizeof("no-cache") - 1; | 295 cc->value.len = sizeof("no-cache") - 1; |
296 cc->value.data = (u_char *) "no-cache"; | 296 cc->value.data = (u_char *) "no-cache"; |
297 | 297 |
298 return NGX_OK; | 298 return NGX_OK; |
299 } | 299 } |