# HG changeset patch # User Ruslan Ermilov # Date 1391093831 -14400 # Node ID f385349d584bc5bf4b43258e2351c07a1906bb93 # Parent 01e2a5bcdd8f65f4f7bcb23ac35911da08e5945f Proxy: fixed upstream search by proxy_pass with variables. If "proxy_pass" is specified with variables, the resulting hostname is looked up in the list of upstreams defined in configuration. The search was case-sensitive, as opposed to the case of "proxy_pass" specified without variables. 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 @@ -612,7 +612,7 @@ ngx_http_upstream_init_request(ngx_http_ if (uscf->host.len == host->len && ((uscf->port == 0 && u->resolved->no_port) || uscf->port == u->resolved->port) - && ngx_memcmp(uscf->host.data, host->data, host->len) == 0) + && ngx_strncasecmp(uscf->host.data, host->data, host->len) == 0) { goto found; }