Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_file_cache.c @ 662:e5fa0a4a7d27 NGINX_1_1_15
nginx 1.1.15
*) Feature: the "disable_symlinks" directive.
*) Feature: the "proxy_cookie_domain" and "proxy_cookie_path"
directives.
*) Bugfix: nginx might log incorrect error "upstream prematurely closed
connection" instead of correct "upstream sent too big header" one.
Thanks to Feibo Li.
*) Bugfix: nginx could not be built with the ngx_http_perl_module if the
--with-openssl option was used.
*) Bugfix: internal redirects to named locations were not limited.
*) Bugfix: calling $r->flush() multiple times might cause errors in the
ngx_http_gzip_filter_module.
*) Bugfix: temporary files might be not removed if the "proxy_store"
directive were used with SSI includes.
*) Bugfix: in some cases non-cacheable variables (such as the $args
variable) returned old empty cached value.
*) Bugfix: a segmentation fault might occur in a worker process if too
many SSI subrequests were issued simultaneously; the bug had appeared
in 0.7.25.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 15 Feb 2012 00:00:00 +0400 |
parents | d0f7a625f27c |
children | f5b859b2f097 |
comparison
equal
deleted
inserted
replaced
661:b49c1751031c | 662:e5fa0a4a7d27 |
---|---|
1595 off_t max_size; | 1595 off_t max_size; |
1596 u_char *last, *p; | 1596 u_char *last, *p; |
1597 time_t inactive; | 1597 time_t inactive; |
1598 ssize_t size; | 1598 ssize_t size; |
1599 ngx_str_t s, name, *value; | 1599 ngx_str_t s, name, *value; |
1600 ngx_int_t loader_files, loader_sleep, loader_threshold; | 1600 ngx_int_t loader_files; |
1601 ngx_msec_t loader_sleep, loader_threshold; | |
1601 ngx_uint_t i, n; | 1602 ngx_uint_t i, n; |
1602 ngx_http_file_cache_t *cache; | 1603 ngx_http_file_cache_t *cache; |
1603 | 1604 |
1604 cache = ngx_pcalloc(cf->pool, sizeof(ngx_http_file_cache_t)); | 1605 cache = ngx_pcalloc(cf->pool, sizeof(ngx_http_file_cache_t)); |
1605 if (cache == NULL) { | 1606 if (cache == NULL) { |
1702 | 1703 |
1703 s.len = value[i].len - 9; | 1704 s.len = value[i].len - 9; |
1704 s.data = value[i].data + 9; | 1705 s.data = value[i].data + 9; |
1705 | 1706 |
1706 inactive = ngx_parse_time(&s, 1); | 1707 inactive = ngx_parse_time(&s, 1); |
1707 if (inactive < 0) { | 1708 if (inactive == (time_t) NGX_ERROR) { |
1708 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 1709 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
1709 "invalid inactive value \"%V\"", &value[i]); | 1710 "invalid inactive value \"%V\"", &value[i]); |
1710 return NGX_CONF_ERROR; | 1711 return NGX_CONF_ERROR; |
1711 } | 1712 } |
1712 | 1713 |
1744 | 1745 |
1745 s.len = value[i].len - 13; | 1746 s.len = value[i].len - 13; |
1746 s.data = value[i].data + 13; | 1747 s.data = value[i].data + 13; |
1747 | 1748 |
1748 loader_sleep = ngx_parse_time(&s, 0); | 1749 loader_sleep = ngx_parse_time(&s, 0); |
1749 if (loader_sleep < 0) { | 1750 if (loader_sleep == (ngx_msec_t) NGX_ERROR) { |
1750 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 1751 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
1751 "invalid loader_sleep value \"%V\"", &value[i]); | 1752 "invalid loader_sleep value \"%V\"", &value[i]); |
1752 return NGX_CONF_ERROR; | 1753 return NGX_CONF_ERROR; |
1753 } | 1754 } |
1754 | 1755 |
1759 | 1760 |
1760 s.len = value[i].len - 17; | 1761 s.len = value[i].len - 17; |
1761 s.data = value[i].data + 17; | 1762 s.data = value[i].data + 17; |
1762 | 1763 |
1763 loader_threshold = ngx_parse_time(&s, 0); | 1764 loader_threshold = ngx_parse_time(&s, 0); |
1764 if (loader_threshold < 0) { | 1765 if (loader_threshold == (ngx_msec_t) NGX_ERROR) { |
1765 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 1766 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
1766 "invalid loader_threshold value \"%V\"", &value[i]); | 1767 "invalid loader_threshold value \"%V\"", &value[i]); |
1767 return NGX_CONF_ERROR; | 1768 return NGX_CONF_ERROR; |
1768 } | 1769 } |
1769 | 1770 |
1786 cache->path->loader = ngx_http_file_cache_loader; | 1787 cache->path->loader = ngx_http_file_cache_loader; |
1787 cache->path->data = cache; | 1788 cache->path->data = cache; |
1788 cache->path->conf_file = cf->conf_file->file.name.data; | 1789 cache->path->conf_file = cf->conf_file->file.name.data; |
1789 cache->path->line = cf->conf_file->line; | 1790 cache->path->line = cf->conf_file->line; |
1790 cache->loader_files = loader_files; | 1791 cache->loader_files = loader_files; |
1791 cache->loader_sleep = (ngx_msec_t) loader_sleep; | 1792 cache->loader_sleep = loader_sleep; |
1792 cache->loader_threshold = (ngx_msec_t) loader_threshold; | 1793 cache->loader_threshold = loader_threshold; |
1793 | 1794 |
1794 if (ngx_add_path(cf, &cache->path) != NGX_OK) { | 1795 if (ngx_add_path(cf, &cache->path) != NGX_OK) { |
1795 return NGX_CONF_ERROR; | 1796 return NGX_CONF_ERROR; |
1796 } | 1797 } |
1797 | 1798 |
1841 | 1842 |
1842 value = cf->args->elts; | 1843 value = cf->args->elts; |
1843 n = cf->args->nelts - 1; | 1844 n = cf->args->nelts - 1; |
1844 | 1845 |
1845 valid = ngx_parse_time(&value[n], 1); | 1846 valid = ngx_parse_time(&value[n], 1); |
1846 if (valid < 0) { | 1847 if (valid == (time_t) NGX_ERROR) { |
1847 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 1848 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
1848 "invalid time value \"%V\"", &value[n]); | 1849 "invalid time value \"%V\"", &value[n]); |
1849 return NGX_CONF_ERROR; | 1850 return NGX_CONF_ERROR; |
1850 } | 1851 } |
1851 | 1852 |