mirror of
https://github.com/nginx/nginx.git
synced 2026-10-24 04:52:25 +00:00
report about proxy/fastcgi_store and proxy/fastcgi_cache incompatibility
This commit is contained in:
parent
da28ef8bff
commit
98f692a91e
2 changed files with 36 additions and 8 deletions
|
|
@ -2549,13 +2549,23 @@ ngx_http_fastcgi_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
value = cf->args->elts;
|
||||
|
||||
if (ngx_strcmp(value[1].data, "on") == 0) {
|
||||
flcf->upstream.store = 1;
|
||||
if (ngx_strcmp(value[1].data, "off") == 0) {
|
||||
flcf->upstream.store = 0;
|
||||
return NGX_CONF_OK;
|
||||
}
|
||||
|
||||
if (ngx_strcmp(value[1].data, "off") == 0) {
|
||||
flcf->upstream.store = 0;
|
||||
#if (NGX_HTTP_CACHE)
|
||||
|
||||
if (flcf->upstream.cache != NGX_CONF_UNSET_PTR
|
||||
&& flcf->upstream.cache != NULL)
|
||||
{
|
||||
return "is incompatible with \"fastcgi_cache\"";
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (ngx_strcmp(value[1].data, "on") == 0) {
|
||||
flcf->upstream.store = 1;
|
||||
return NGX_CONF_OK;
|
||||
}
|
||||
|
||||
|
|
@ -2600,6 +2610,10 @@ ngx_http_fastcgi_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
return NGX_CONF_OK;
|
||||
}
|
||||
|
||||
if (flcf->upstream.store > 0 || flcf->upstream.store_lengths) {
|
||||
return "is incompatible with \"fastcgi_store\"";
|
||||
}
|
||||
|
||||
flcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0,
|
||||
&ngx_http_fastcgi_module);
|
||||
if (flcf->upstream.cache == NULL) {
|
||||
|
|
|
|||
|
|
@ -2817,13 +2817,23 @@ ngx_http_proxy_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
value = cf->args->elts;
|
||||
|
||||
if (ngx_strcmp(value[1].data, "on") == 0) {
|
||||
plcf->upstream.store = 1;
|
||||
if (ngx_strcmp(value[1].data, "off") == 0) {
|
||||
plcf->upstream.store = 0;
|
||||
return NGX_CONF_OK;
|
||||
}
|
||||
|
||||
if (ngx_strcmp(value[1].data, "off") == 0) {
|
||||
plcf->upstream.store = 0;
|
||||
#if (NGX_HTTP_CACHE)
|
||||
|
||||
if (plcf->upstream.cache != NGX_CONF_UNSET_PTR
|
||||
&& plcf->upstream.cache != NULL)
|
||||
{
|
||||
return "is incompatible with \"proxy_cache\"";
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (ngx_strcmp(value[1].data, "on") == 0) {
|
||||
plcf->upstream.store = 1;
|
||||
return NGX_CONF_OK;
|
||||
}
|
||||
|
||||
|
|
@ -2868,6 +2878,10 @@ ngx_http_proxy_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
return NGX_CONF_OK;
|
||||
}
|
||||
|
||||
if (plcf->upstream.store > 0 || plcf->upstream.store_lengths) {
|
||||
return "is incompatible with \"proxy_store\"";
|
||||
}
|
||||
|
||||
plcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0,
|
||||
&ngx_http_proxy_module);
|
||||
if (plcf->upstream.cache == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue