# HG changeset patch # User Igor Sysoev # Date 1165784400 -10800 # Node ID 4de4f8bc5d07cec10ae93aff0b51c3b87e158555 # Parent 34f7e991e4f7b1d5459463c22a353f9b7f548c1e nginx 0.5.2 *) Bugfix: if the "proxy_pass" directive used the name of the "upstream" block, then nginx tried to resolve the name; bug appeared in 0.5.1. diff --git a/src/core/nginx.h b/src/core/nginx.h --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VERSION "0.5.1" +#define NGINX_VERSION "0.5.2" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm --- a/src/http/modules/perl/nginx.pm +++ b/src/http/modules/perl/nginx.pm @@ -17,7 +17,7 @@ our @EXPORT = qw( HTTP_SERVER_ERROR ); -our $VERSION = '0.5.1'; +our $VERSION = '0.5.2'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2843,7 +2843,7 @@ ngx_http_upstream_add(ngx_conf_t *cf, ng uscfp = umcf->upstreams.elts; for (i = 0; i < umcf->upstreams.nelts; i++) { - if (uscfp[i]->port != u->portn + if ((uscfp[i]->port && uscfp[i]->port != u->portn) || uscfp[i]->host.len != u->host.len || ngx_strncasecmp(uscfp[i]->host.data, u->host.data, u->host.len) != 0)