]> git.kaiwu.me - nginx.git/commitdiff
test port in fastcgi_pass variable
authorIgor Sysoev <igor@sysoev.ru>
Wed, 10 Dec 2008 16:25:14 +0000 (16:25 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 10 Dec 2008 16:25:14 +0000 (16:25 +0000)
src/http/modules/ngx_http_fastcgi_module.c

index 301449fee9529389aacb0da621f765561429f323..9579277415878ec2d832634c078f4a01c5d86422 100644 (file)
@@ -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) {