diff src/http/ngx_http_upstream.c @ 434:49a0eb7ce20c NGINX_0_7_29

nginx 0.7.29 *) Bugfix: the "fastcgi_pass" and "proxy_pass" directives did not support variables if unix domain sockets were used. *) Bugfixes in subrequest processing; the bugs had appeared in 0.7.25. *) Bugfix: a "100 Continue" response was issued for HTTP/1.0 requests; Thanks to Maxim Dounin. *) Bugfix: in memory allocation in the ngx_http_gzip_filter_module on Cygwin.
author Igor Sysoev <http://sysoev.ru>
date Wed, 24 Dec 2008 00:00:00 +0300
parents fd759445d8a8
children ce4f9ff90bfa
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -414,6 +414,20 @@ ngx_http_upstream_init(ngx_http_request_
 
     } else {
 
+        if (u->resolved->sockaddr) {
+
+            if (ngx_http_upstream_create_round_robin_peer(r, u->resolved)
+                != NGX_OK)
+            {
+                ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+                return;
+            }
+
+            ngx_http_upstream_connect(r, u);
+
+            return;
+        }
+
         host = &u->resolved->host;
 
         umcf = ngx_http_get_module_main_conf(r, ngx_http_upstream_module);