Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_scgi_module.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 | 72cc5b789021 |
children | 215fe9223419 |
comparison
equal
deleted
inserted
replaced
3878:7562ee4feb74 | 3879:502a6b0acf3f |
---|---|
456 } | 456 } |
457 | 457 |
458 return NGX_ERROR; | 458 return NGX_ERROR; |
459 } | 459 } |
460 | 460 |
461 if (url.no_port) { | |
462 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | |
463 "no port in upstream \"%V\"", &url.url); | |
464 return NGX_ERROR; | |
465 } | |
466 | |
467 u = r->upstream; | 461 u = r->upstream; |
468 | 462 |
469 u->resolved = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_resolved_t)); | 463 u->resolved = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_resolved_t)); |
470 if (u->resolved == NULL) { | 464 if (u->resolved == NULL) { |
471 return NGX_ERROR; | 465 return NGX_ERROR; |
478 u->resolved->host = url.addrs[0].name; | 472 u->resolved->host = url.addrs[0].name; |
479 | 473 |
480 } else { | 474 } else { |
481 u->resolved->host = url.host; | 475 u->resolved->host = url.host; |
482 u->resolved->port = url.port; | 476 u->resolved->port = url.port; |
477 u->resolved->no_port = url.no_port; | |
483 } | 478 } |
484 | 479 |
485 return NGX_OK; | 480 return NGX_OK; |
486 } | 481 } |
487 | 482 |