comparison src/http/modules/ngx_http_fastcgi_module.c @ 2391:d88e757cc7d8

delete surplus upstream.schema field
author Igor Sysoev <igor@sysoev.ru>
date Wed, 10 Dec 2008 14:44:48 +0000
parents 27ccc4b54fa6
children b1a24d3cf4dd
comparison
equal deleted inserted replaced
2390:27ccc4b54fa6 2391:d88e757cc7d8
1679 * 1679 *
1680 * conf->upstream.bufs.num = 0; 1680 * conf->upstream.bufs.num = 0;
1681 * conf->upstream.next_upstream = 0; 1681 * conf->upstream.next_upstream = 0;
1682 * conf->upstream.temp_path = NULL; 1682 * conf->upstream.temp_path = NULL;
1683 * conf->upstream.hide_headers_hash = { NULL, 0 }; 1683 * conf->upstream.hide_headers_hash = { NULL, 0 };
1684 * conf->upstream.schema = { 0, NULL };
1685 * conf->upstream.uri = { 0, NULL }; 1684 * conf->upstream.uri = { 0, NULL };
1686 * conf->upstream.location = NULL; 1685 * conf->upstream.location = NULL;
1687 * conf->upstream.store_lengths = NULL; 1686 * conf->upstream.store_lengths = NULL;
1688 * conf->upstream.store_values = NULL; 1687 * conf->upstream.store_values = NULL;
1689 * 1688 *
1909 return NGX_CONF_ERROR; 1908 return NGX_CONF_ERROR;
1910 } 1909 }
1911 1910
1912 if (conf->upstream.upstream == NULL) { 1911 if (conf->upstream.upstream == NULL) {
1913 conf->upstream.upstream = prev->upstream.upstream; 1912 conf->upstream.upstream = prev->upstream.upstream;
1914 conf->upstream.schema = prev->upstream.schema;
1915 } 1913 }
1916 1914
1917 if (conf->fastcgi_lengths == NULL) { 1915 if (conf->fastcgi_lengths == NULL) {
1918 conf->fastcgi_lengths = prev->fastcgi_lengths; 1916 conf->fastcgi_lengths = prev->fastcgi_lengths;
1919 conf->fastcgi_values = prev->fastcgi_values; 1917 conf->fastcgi_values = prev->fastcgi_values;
2105 ngx_str_t *value, *url; 2103 ngx_str_t *value, *url;
2106 ngx_uint_t n; 2104 ngx_uint_t n;
2107 ngx_http_core_loc_conf_t *clcf; 2105 ngx_http_core_loc_conf_t *clcf;
2108 ngx_http_script_compile_t sc; 2106 ngx_http_script_compile_t sc;
2109 2107
2110 if (flcf->upstream.schema.len) { 2108 if (flcf->upstream.upstream || flcf->fastcgi_lengths) {
2111 return "is duplicate"; 2109 return "is duplicate";
2112 } 2110 }
2113 2111
2114 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); 2112 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
2115 clcf->handler = ngx_http_fastcgi_handler; 2113 clcf->handler = ngx_http_fastcgi_handler;
2116
2117 flcf->upstream.schema.len = sizeof("fastcgi://") - 1;
2118 flcf->upstream.schema.data = (u_char *) "fastcgi://";
2119 2114
2120 value = cf->args->elts; 2115 value = cf->args->elts;
2121 2116
2122 url = &value[1]; 2117 url = &value[1];
2123 2118