diff src/http/modules/ngx_http_fastcgi_module.c @ 104:146eff53ab60 NGINX_0_2_6

nginx 0.2.6 *) Change: while using load-balancing the time before the failed backend retry was decreased from 60 to 10 seconds. *) Change: the "proxy_pass_unparsed_uri" was canceled, the original URI now passed, if the URI part is omitted in "proxy_pass" directive. *) Feature: the "error_page" directive supports redirects and allows more flexible to change an error code. *) Change: the charset in the "Content-Type" header line now is ignored in proxied subrequests. *) Bugfix: if the URI was changed in the "if" block and request did not found new configuration, then the ngx_http_rewrite_module rules ran again. *) Bugfix: if the "set" directive set the ngx_http_geo_module variable in some configuration part, the this variable was not available in other configuration parts and the "using uninitialized variable" error was occurred; bug appeared in 0.2.2.
author Igor Sysoev <http://sysoev.ru>
date Wed, 05 Oct 2005 00:00:00 +0400
parents ca4f70b3ccc6
children dad2fe8ecf08
line wrap: on
line diff
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -148,11 +148,6 @@ static ngx_str_t  ngx_http_fastcgi_scrip
     ngx_string("fastcgi_script_name");
 
 
-#if (NGX_PCRE)
-static ngx_str_t ngx_http_fastcgi_uri = ngx_string("/");
-#endif
-
-
 static ngx_conf_post_t  ngx_http_fastcgi_lowat_post =
     { ngx_http_fastcgi_lowat_check };
 
@@ -1448,7 +1443,6 @@ ngx_http_fastcgi_create_loc_conf(ngx_con
     conf->upstream.max_temp_file_size_conf = NGX_CONF_UNSET_SIZE; 
     conf->upstream.temp_file_write_size_conf = NGX_CONF_UNSET_SIZE;
 
-    conf->upstream.pass_unparsed_uri = NGX_CONF_UNSET;
     conf->upstream.method = NGX_CONF_UNSET_UINT;
     conf->upstream.pass_request_headers = NGX_CONF_UNSET;
     conf->upstream.pass_request_body = NGX_CONF_UNSET;
@@ -1602,16 +1596,6 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf
                               NGX_HTTP_FASTCGI_TEMP_PATH, 1, 2, 0,
                               ngx_garbage_collector_temp_handler, cf);
 
-    ngx_conf_merge_value(conf->upstream.pass_unparsed_uri,
-                              prev->upstream.pass_unparsed_uri, 0);
-
-    if (conf->upstream.pass_unparsed_uri && conf->upstream.location->len > 1) {
-        ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
-                      "\"fastcgi_pass_unparsed_uri\" can be set for "
-                      "location \"/\" or given by regular expression.");
-        return NGX_CONF_ERROR;
-    }
-
     if (conf->upstream.method == NGX_CONF_UNSET_UINT) {
         conf->upstream.method = prev->upstream.method; 
     }
@@ -1812,6 +1796,10 @@ ngx_http_fastcgi_pass(ngx_conf_t *cf, ng
     ngx_unix_domain_upstream_t   unix_upstream;
 #endif
 
+    if (lcf->upstream.schema.len) {
+        return "is duplicate";
+    }
+
     value = cf->args->elts;
 
     if (ngx_strncasecmp(value[1].data, "unix:", 5) == 0) {
@@ -1828,6 +1816,8 @@ ngx_http_fastcgi_pass(ngx_conf_t *cf, ng
             return NGX_CONF_ERROR;
         }
 
+        lcf->peers->peer[0].uri_separator = "";
+
 #else
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "the unix domain sockets are not supported "
@@ -1850,18 +1840,12 @@ ngx_http_fastcgi_pass(ngx_conf_t *cf, ng
 
     lcf->upstream.schema.len = sizeof("fastcgi://") - 1;
     lcf->upstream.schema.data = (u_char *) "fastcgi://";
-    lcf->upstream.uri.len = sizeof("/") - 1;
-    lcf->upstream.uri.data = (u_char *) "/";
 
     clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
 
     clcf->handler = ngx_http_fastcgi_handler;
 
-#if (NGX_PCRE)
-    lcf->upstream.location = clcf->regex ? &ngx_http_fastcgi_uri : &clcf->name;
-#else
     lcf->upstream.location = &clcf->name;
-#endif
 
     if (clcf->name.data[clcf->name.len - 1] == '/') {
         clcf->auto_redirect = 1;