comparison src/http/ngx_http_upstream.c @ 3879:502a6b0acf3f

fix case when a host in fastcgi_pass, scgi_pass, and uwsgi_pass is given by expression and refers to a defined upstream
author Igor Sysoev <igor@sysoev.ru>
date Mon, 04 Apr 2011 10:43:21 +0000
parents f0b62d1ac7af
children bd1222fb0192
comparison
equal deleted inserted replaced
3878:7562ee4feb74 3879:502a6b0acf3f
572 { 572 {
573 goto found; 573 goto found;
574 } 574 }
575 } 575 }
576 576
577 if (u->resolved->port == 0) {
578 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
579 "no port in upstream \"%V\"", host);
580 ngx_http_upstream_finalize_request(r, u,
581 NGX_HTTP_INTERNAL_SERVER_ERROR);
582 return;
583 }
584
577 temp.name = *host; 585 temp.name = *host;
578 586
579 ctx = ngx_resolve_start(clcf->resolver, &temp); 587 ctx = ngx_resolve_start(clcf->resolver, &temp);
580 if (ctx == NULL) { 588 if (ctx == NULL) {
581 ngx_http_upstream_finalize_request(r, u, 589 ngx_http_upstream_finalize_request(r, u,