Mercurial > hg > nginx-vendor-current
diff src/http/modules/ngx_http_headers_filter_module.c @ 646:615b5ea36fc0 NGINX_1_1_7
nginx 1.1.7
*) Feature: support of several resolvers in the "resolver" directive.
Thanks to Kirill A. Korinskiy.
*) Bugfix: a segmentation fault occurred on start or while
reconfiguration if the "ssl" directive was used at http level and
there was no "ssl_certificate" defined.
*) Bugfix: reduced memory consumption while proxying of big files if
they were buffered to disk.
*) Bugfix: a segmentation fault might occur in a worker process if
"proxy_http_version 1.1" directive was used.
*) Bugfix: in the "expires @time" directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 31 Oct 2011 00:00:00 +0400 |
parents | eb208e0cf44d |
children | 4d05413aebad |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_headers_filter_module.c +++ b/src/http/modules/ngx_http_headers_filter_module.c @@ -253,7 +253,7 @@ ngx_http_set_expires(ngx_http_request_t return NGX_ERROR; } - if (conf->expires_time == 0) { + if (conf->expires_time == 0 && conf->expires != NGX_HTTP_EXPIRES_DAILY) { ngx_memcpy(expires->value.data, ngx_cached_http_time.data, ngx_cached_http_time.len + 1); ngx_str_set(&cc->value, "max-age=0"); @@ -262,16 +262,16 @@ ngx_http_set_expires(ngx_http_request_t now = ngx_time(); - if (conf->expires == NGX_HTTP_EXPIRES_ACCESS - || r->headers_out.last_modified_time == -1) + if (conf->expires == NGX_HTTP_EXPIRES_DAILY) { + expires_time = ngx_next_time(conf->expires_time); + max_age = expires_time - now; + + } else if (conf->expires == NGX_HTTP_EXPIRES_ACCESS + || r->headers_out.last_modified_time == -1) { expires_time = now + conf->expires_time; max_age = conf->expires_time; - } else if (conf->expires == NGX_HTTP_EXPIRES_DAILY) { - expires_time = ngx_next_time(conf->expires_time); - max_age = expires_time - now; - } else { expires_time = r->headers_out.last_modified_time + conf->expires_time; max_age = expires_time - now;