Mercurial > hg > nginx-vendor-current
comparison 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 |
comparison
equal
deleted
inserted
replaced
645:e461dead01e9 | 646:615b5ea36fc0 |
---|---|
251 expires->value.data = ngx_pnalloc(r->pool, len); | 251 expires->value.data = ngx_pnalloc(r->pool, len); |
252 if (expires->value.data == NULL) { | 252 if (expires->value.data == NULL) { |
253 return NGX_ERROR; | 253 return NGX_ERROR; |
254 } | 254 } |
255 | 255 |
256 if (conf->expires_time == 0) { | 256 if (conf->expires_time == 0 && conf->expires != NGX_HTTP_EXPIRES_DAILY) { |
257 ngx_memcpy(expires->value.data, ngx_cached_http_time.data, | 257 ngx_memcpy(expires->value.data, ngx_cached_http_time.data, |
258 ngx_cached_http_time.len + 1); | 258 ngx_cached_http_time.len + 1); |
259 ngx_str_set(&cc->value, "max-age=0"); | 259 ngx_str_set(&cc->value, "max-age=0"); |
260 return NGX_OK; | 260 return NGX_OK; |
261 } | 261 } |
262 | 262 |
263 now = ngx_time(); | 263 now = ngx_time(); |
264 | 264 |
265 if (conf->expires == NGX_HTTP_EXPIRES_ACCESS | 265 if (conf->expires == NGX_HTTP_EXPIRES_DAILY) { |
266 || r->headers_out.last_modified_time == -1) | 266 expires_time = ngx_next_time(conf->expires_time); |
267 max_age = expires_time - now; | |
268 | |
269 } else if (conf->expires == NGX_HTTP_EXPIRES_ACCESS | |
270 || r->headers_out.last_modified_time == -1) | |
267 { | 271 { |
268 expires_time = now + conf->expires_time; | 272 expires_time = now + conf->expires_time; |
269 max_age = conf->expires_time; | 273 max_age = conf->expires_time; |
270 | |
271 } else if (conf->expires == NGX_HTTP_EXPIRES_DAILY) { | |
272 expires_time = ngx_next_time(conf->expires_time); | |
273 max_age = expires_time - now; | |
274 | 274 |
275 } else { | 275 } else { |
276 expires_time = r->headers_out.last_modified_time + conf->expires_time; | 276 expires_time = r->headers_out.last_modified_time + conf->expires_time; |
277 max_age = expires_time - now; | 277 max_age = expires_time - now; |
278 } | 278 } |