test port in fastcgi_pass variable

This commit is contained in:
Igor Sysoev 2008-12-10 16:25:14 +00:00
parent 1e2d6aa0e8
commit 0c54fef3e0

View File

@ -500,6 +500,12 @@ ngx_http_fastcgi_eval(ngx_http_request_t *r, ngx_http_fastcgi_loc_conf_t *flcf)
return NGX_ERROR; 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, r->upstream->resolved = ngx_pcalloc(r->pool,
sizeof(ngx_http_upstream_resolved_t)); sizeof(ngx_http_upstream_resolved_t));
if (r->upstream->resolved == NULL) { if (r->upstream->resolved == NULL) {