Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_fastcgi_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 | ca7b9caa20e5 |
children | 215fe9223419 |
comparison
equal
deleted
inserted
replaced
3878:7562ee4feb74 | 3879:502a6b0acf3f |
---|---|
634 } | 634 } |
635 | 635 |
636 return NGX_ERROR; | 636 return NGX_ERROR; |
637 } | 637 } |
638 | 638 |
639 if (url.no_port) { | |
640 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | |
641 "no port in upstream \"%V\"", &url.url); | |
642 return NGX_ERROR; | |
643 } | |
644 | |
645 u = r->upstream; | 639 u = r->upstream; |
646 | 640 |
647 u->resolved = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_resolved_t)); | 641 u->resolved = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_resolved_t)); |
648 if (u->resolved == NULL) { | 642 if (u->resolved == NULL) { |
649 return NGX_ERROR; | 643 return NGX_ERROR; |
656 u->resolved->host = url.addrs[0].name; | 650 u->resolved->host = url.addrs[0].name; |
657 | 651 |
658 } else { | 652 } else { |
659 u->resolved->host = url.host; | 653 u->resolved->host = url.host; |
660 u->resolved->port = url.port; | 654 u->resolved->port = url.port; |
655 u->resolved->no_port = url.no_port; | |
661 } | 656 } |
662 | 657 |
663 return NGX_OK; | 658 return NGX_OK; |
664 } | 659 } |
665 | 660 |