Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 2895:d65e58a8d3a4
report about proxy/fastcgi_store and proxy/fastcgi_cache incompatibility
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 28 May 2009 13:41:44 +0000 |
parents | d26f4e80c71f |
children | c7d57b539248 |
comparison
equal
deleted
inserted
replaced
2894:d26f4e80c71f | 2895:d65e58a8d3a4 |
---|---|
2815 return "is duplicate"; | 2815 return "is duplicate"; |
2816 } | 2816 } |
2817 | 2817 |
2818 value = cf->args->elts; | 2818 value = cf->args->elts; |
2819 | 2819 |
2820 if (ngx_strcmp(value[1].data, "off") == 0) { | |
2821 plcf->upstream.store = 0; | |
2822 return NGX_CONF_OK; | |
2823 } | |
2824 | |
2825 #if (NGX_HTTP_CACHE) | |
2826 | |
2827 if (plcf->upstream.cache != NGX_CONF_UNSET_PTR | |
2828 && plcf->upstream.cache != NULL) | |
2829 { | |
2830 return "is incompatible with \"proxy_cache\""; | |
2831 } | |
2832 | |
2833 #endif | |
2834 | |
2820 if (ngx_strcmp(value[1].data, "on") == 0) { | 2835 if (ngx_strcmp(value[1].data, "on") == 0) { |
2821 plcf->upstream.store = 1; | 2836 plcf->upstream.store = 1; |
2822 return NGX_CONF_OK; | |
2823 } | |
2824 | |
2825 if (ngx_strcmp(value[1].data, "off") == 0) { | |
2826 plcf->upstream.store = 0; | |
2827 return NGX_CONF_OK; | 2837 return NGX_CONF_OK; |
2828 } | 2838 } |
2829 | 2839 |
2830 /* include the terminating '\0' into script */ | 2840 /* include the terminating '\0' into script */ |
2831 value[1].len++; | 2841 value[1].len++; |
2864 } | 2874 } |
2865 | 2875 |
2866 if (ngx_strcmp(value[1].data, "off") == 0) { | 2876 if (ngx_strcmp(value[1].data, "off") == 0) { |
2867 plcf->upstream.cache = NULL; | 2877 plcf->upstream.cache = NULL; |
2868 return NGX_CONF_OK; | 2878 return NGX_CONF_OK; |
2879 } | |
2880 | |
2881 if (plcf->upstream.store > 0 || plcf->upstream.store_lengths) { | |
2882 return "is incompatible with \"proxy_store\""; | |
2869 } | 2883 } |
2870 | 2884 |
2871 plcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0, | 2885 plcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0, |
2872 &ngx_http_proxy_module); | 2886 &ngx_http_proxy_module); |
2873 if (plcf->upstream.cache == NULL) { | 2887 if (plcf->upstream.cache == NULL) { |