changeset 2396:848d944eae81

test port in fastcgi_pass variable
author Igor Sysoev <igor@sysoev.ru>
date Wed, 10 Dec 2008 16:25:14 +0000
parents b1a24d3cf4dd
children da6f70bb41f0
files src/http/modules/ngx_http_fastcgi_module.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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) {