Mercurial > hg > nginx-ranges
comparison src/http/modules/ngx_http_fastcgi_module.c @ 505:f39b9e29530d NGINX_0_8_0
nginx 0.8.0
*) Feature: the "keepalive_requests" directive.
*) Feature: the "limit_rate_after" directive.
Thanks to Ivan Debnar.
*) Bugfix: XLST filter did not work in subrequests.
*) Bugfix: in relative paths handling in nginx/Windows.
*) Bugfix: in proxy_store, fastcgi_store, proxy_cache, and
fastcgi_cache in nginx/Windows.
*) Bugfix: in memory allocation error handling.
Thanks to Maxim Dounin and Kirill A. Korinskiy.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 02 Jun 2009 00:00:00 +0400 |
parents | 499474178a11 |
children | 207ae3ff0444 |
comparison
equal
deleted
inserted
replaced
504:6d9fb4461113 | 505:f39b9e29530d |
---|---|
1831 { | 1831 { |
1832 ngx_http_fastcgi_loc_conf_t *conf; | 1832 ngx_http_fastcgi_loc_conf_t *conf; |
1833 | 1833 |
1834 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_fastcgi_loc_conf_t)); | 1834 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_fastcgi_loc_conf_t)); |
1835 if (conf == NULL) { | 1835 if (conf == NULL) { |
1836 return NGX_CONF_ERROR; | 1836 return NULL; |
1837 } | 1837 } |
1838 | 1838 |
1839 /* | 1839 /* |
1840 * set by ngx_pcalloc(): | 1840 * set by ngx_pcalloc(): |
1841 * | 1841 * |
1909 ngx_http_script_compile_t sc; | 1909 ngx_http_script_compile_t sc; |
1910 ngx_http_script_copy_code_t *copy; | 1910 ngx_http_script_copy_code_t *copy; |
1911 | 1911 |
1912 if (conf->upstream.store != 0) { | 1912 if (conf->upstream.store != 0) { |
1913 ngx_conf_merge_value(conf->upstream.store, | 1913 ngx_conf_merge_value(conf->upstream.store, |
1914 prev->upstream.store, 0); | 1914 prev->upstream.store, 0); |
1915 | 1915 |
1916 if (conf->upstream.store_lengths == NULL) { | 1916 if (conf->upstream.store_lengths == NULL) { |
1917 conf->upstream.store_lengths = prev->upstream.store_lengths; | 1917 conf->upstream.store_lengths = prev->upstream.store_lengths; |
1918 conf->upstream.store_values = prev->upstream.store_values; | 1918 conf->upstream.store_values = prev->upstream.store_values; |
1919 } | 1919 } |
2539 ngx_http_fastcgi_loc_conf_t *flcf = conf; | 2539 ngx_http_fastcgi_loc_conf_t *flcf = conf; |
2540 | 2540 |
2541 ngx_str_t *value; | 2541 ngx_str_t *value; |
2542 ngx_http_script_compile_t sc; | 2542 ngx_http_script_compile_t sc; |
2543 | 2543 |
2544 if (flcf->upstream.store != NGX_CONF_UNSET || flcf->upstream.store_lengths) | 2544 if (flcf->upstream.store != NGX_CONF_UNSET |
2545 || flcf->upstream.store_lengths) | |
2545 { | 2546 { |
2546 return "is duplicate"; | 2547 return "is duplicate"; |
2547 } | 2548 } |
2548 | 2549 |
2549 value = cf->args->elts; | 2550 value = cf->args->elts; |
2550 | 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 | |
2551 if (ngx_strcmp(value[1].data, "on") == 0) { | 2567 if (ngx_strcmp(value[1].data, "on") == 0) { |
2552 flcf->upstream.store = 1; | 2568 flcf->upstream.store = 1; |
2553 return NGX_CONF_OK; | |
2554 } | |
2555 | |
2556 if (ngx_strcmp(value[1].data, "off") == 0) { | |
2557 flcf->upstream.store = 0; | |
2558 return NGX_CONF_OK; | 2569 return NGX_CONF_OK; |
2559 } | 2570 } |
2560 | 2571 |
2561 /* include the terminating '\0' into script */ | 2572 /* include the terminating '\0' into script */ |
2562 value[1].len++; | 2573 value[1].len++; |
2595 } | 2606 } |
2596 | 2607 |
2597 if (ngx_strcmp(value[1].data, "off") == 0) { | 2608 if (ngx_strcmp(value[1].data, "off") == 0) { |
2598 flcf->upstream.cache = NULL; | 2609 flcf->upstream.cache = NULL; |
2599 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\""; | |
2600 } | 2615 } |
2601 | 2616 |
2602 flcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0, | 2617 flcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0, |
2603 &ngx_http_fastcgi_module); | 2618 &ngx_http_fastcgi_module); |
2604 if (flcf->upstream.cache == NULL) { | 2619 if (flcf->upstream.cache == NULL) { |