comparison src/http/modules/ngx_http_fastcgi_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
2547 return "is duplicate"; 2547 return "is duplicate";
2548 } 2548 }
2549 2549
2550 value = cf->args->elts; 2550 value = cf->args->elts;
2551 2551
2552 if (ngx_strcmp(value[1].data, "off") == 0) {
2553 flcf->upstream.store = 0;
2554 return NGX_CONF_OK;
2555 }
2556
2557 #if (NGX_HTTP_CACHE)
2558
2559 if (flcf->upstream.cache != NGX_CONF_UNSET_PTR
2560 && flcf->upstream.cache != NULL)
2561 {
2562 return "is incompatible with \"fastcgi_cache\"";
2563 }
2564
2565 #endif
2566
2552 if (ngx_strcmp(value[1].data, "on") == 0) { 2567 if (ngx_strcmp(value[1].data, "on") == 0) {
2553 flcf->upstream.store = 1; 2568 flcf->upstream.store = 1;
2554 return NGX_CONF_OK;
2555 }
2556
2557 if (ngx_strcmp(value[1].data, "off") == 0) {
2558 flcf->upstream.store = 0;
2559 return NGX_CONF_OK; 2569 return NGX_CONF_OK;
2560 } 2570 }
2561 2571
2562 /* include the terminating '\0' into script */ 2572 /* include the terminating '\0' into script */
2563 value[1].len++; 2573 value[1].len++;
2596 } 2606 }
2597 2607
2598 if (ngx_strcmp(value[1].data, "off") == 0) { 2608 if (ngx_strcmp(value[1].data, "off") == 0) {
2599 flcf->upstream.cache = NULL; 2609 flcf->upstream.cache = NULL;
2600 return NGX_CONF_OK; 2610 return NGX_CONF_OK;
2611 }
2612
2613 if (flcf->upstream.store > 0 || flcf->upstream.store_lengths) {
2614 return "is incompatible with \"fastcgi_store\"";
2601 } 2615 }
2602 2616
2603 flcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0, 2617 flcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0,
2604 &ngx_http_fastcgi_module); 2618 &ngx_http_fastcgi_module);
2605 if (flcf->upstream.cache == NULL) { 2619 if (flcf->upstream.cache == NULL) {