patch

Igor Sysoev is at rambler-co.ru
Tue Jan 18 18:17:38 MSK 2005


Патч для двух ошибок.

1) segfault при таких параметрах конфигурации:

   --http-client-body-temp-path=/tmp/nginx
   --http-proxy-temp-path=/tmp/nginx

   или

   --http-client-body-temp-path=/tmp/nginx
   --http-fastcgi-temp-path=/tmp/nginx

2) Если порт бекэнда 80, то он передавался в заголоке "Host".


Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
--- src/core/ngx_file.c	Wed Jan  5 18:53:44 2005
+++ src/core/ngx_file.c	Tue Jan 18 17:58:53 2005
@@ -252,9 +252,19 @@
             for (n = 0; n < 3; n++) {
                 if (p[i]->level[n] != path->level[n]) {
                     if (path->conf_file == NULL) {
+                        if (p[i]->conf_file == NULL) {
+                            ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
+                                      "the default path name \"%V\" has "
+                                      "the same name as another default path, "
+                                      "but the different levels, you need to "
+                                      "redefine one of them in http section",
+                                      &p[i]->name);
+                            return NGX_ERROR;
+                        }
+
                         ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
                                       "the path name \"%V\" in %s:%ui has "
-                                      "the same name as default path but "
+                                      "the same name as default path, but "
                                       "the different levels, you need to "
                                       "define default path in http section",
                                       &p[i]->name, p[i]->conf_file, p[i]->line);
--- src/http/modules/proxy/ngx_http_proxy_handler.c	Tue Jan 18 14:37:33 2005
+++ src/http/modules/proxy/ngx_http_proxy_handler.c	Tue Jan 18 18:11:12 2005
@@ -1351,6 +1351,7 @@
         lcf->upstream->port_text = inet_upstream.port_text;
         lcf->upstream->uri = inet_upstream.uri;
         lcf->upstream->uri_separator = "";
+        lcf->upstream->default_port = inet_upstream.default_port;
     }
 
     clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);


More information about the nginx-ru mailing list