Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 4447:2b2d51cdbd97 stable-1.0
Merge of r4402:
Fixed proxy_cache_use_stale in "no live upstreams" case.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sun, 05 Feb 2012 19:23:44 +0000 |
parents | fd40c9ef750d |
children | 4919fb357a5d |
comparison
equal
deleted
inserted
replaced
4446:fd40c9ef750d | 4447:2b2d51cdbd97 |
---|---|
1901 ngx_conf_merge_bitmask_value(conf->upstream.cache_use_stale, | 1901 ngx_conf_merge_bitmask_value(conf->upstream.cache_use_stale, |
1902 prev->upstream.cache_use_stale, | 1902 prev->upstream.cache_use_stale, |
1903 (NGX_CONF_BITMASK_SET | 1903 (NGX_CONF_BITMASK_SET |
1904 |NGX_HTTP_UPSTREAM_FT_OFF)); | 1904 |NGX_HTTP_UPSTREAM_FT_OFF)); |
1905 | 1905 |
1906 if (conf->upstream.cache_methods == 0) { | |
1907 conf->upstream.cache_methods = prev->upstream.cache_methods; | |
1908 } | |
1909 | |
1910 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; | |
1911 | |
1912 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { | 1906 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { |
1913 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET | 1907 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET |
1914 |NGX_HTTP_UPSTREAM_FT_OFF; | 1908 |NGX_HTTP_UPSTREAM_FT_OFF; |
1915 } | 1909 } |
1910 | |
1911 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) { | |
1912 conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE; | |
1913 } | |
1914 | |
1915 if (conf->upstream.cache_methods == 0) { | |
1916 conf->upstream.cache_methods = prev->upstream.cache_methods; | |
1917 } | |
1918 | |
1919 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; | |
1916 | 1920 |
1917 ngx_conf_merge_ptr_value(conf->upstream.cache_bypass, | 1921 ngx_conf_merge_ptr_value(conf->upstream.cache_bypass, |
1918 prev->upstream.cache_bypass, NULL); | 1922 prev->upstream.cache_bypass, NULL); |
1919 | 1923 |
1920 ngx_conf_merge_ptr_value(conf->upstream.no_cache, | 1924 ngx_conf_merge_ptr_value(conf->upstream.no_cache, |