# HG changeset patch # User Igor Sysoev # Date 1228926314 0 # Node ID 848d944eae8186dc9bcd8c74f9af0eb0169ae40a # Parent b1a24d3cf4dd826ad7bd97c34cea401250e08c15 test port in fastcgi_pass variable diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -500,6 +500,12 @@ ngx_http_fastcgi_eval(ngx_http_request_t return NGX_ERROR; } + if (u.no_port) { + ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, + "no port in upstream \"%V\"", &u.url); + return NGX_ERROR; + } + r->upstream->resolved = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_resolved_t)); if (r->upstream->resolved == NULL) {