From 0c54fef3e044a41825f7eefbe8460918a63ac172 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 10 Dec 2008 16:25:14 +0000 Subject: [PATCH] test port in fastcgi_pass variable --- src/http/modules/ngx_http_fastcgi_module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index 301449fee..957927741 100644 --- 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 *r, ngx_http_fastcgi_loc_conf_t *flcf) 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) {