Mercurial > hg > nginx
comparison src/http/modules/ngx_http_uwsgi_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 |
---|---|
489 } | 489 } |
490 | 490 |
491 return NGX_ERROR; | 491 return NGX_ERROR; |
492 } | 492 } |
493 | 493 |
494 if (url.no_port) { | |
495 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | |
496 "no port in upstream \"%V\"", &url.url); | |
497 return NGX_ERROR; | |
498 } | |
499 | |
500 u = r->upstream; | 494 u = r->upstream; |
501 | 495 |
502 u->resolved = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_resolved_t)); | 496 u->resolved = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_resolved_t)); |
503 if (u->resolved == NULL) { | 497 if (u->resolved == NULL) { |
504 return NGX_ERROR; | 498 return NGX_ERROR; |
511 u->resolved->host = url.addrs[0].name; | 505 u->resolved->host = url.addrs[0].name; |
512 | 506 |
513 } else { | 507 } else { |
514 u->resolved->host = url.host; | 508 u->resolved->host = url.host; |
515 u->resolved->port = url.port; | 509 u->resolved->port = url.port; |
510 u->resolved->no_port = url.no_port; | |
516 } | 511 } |
517 | 512 |
518 return NGX_OK; | 513 return NGX_OK; |
519 } | 514 } |
520 | 515 |