diff src/http/ngx_http_upstream.c @ 2422:7af1e5fe102c

variable support for unix sockets in fastcgi_pass and proxy_pass
author Igor Sysoev <igor@sysoev.ru>
date Tue, 23 Dec 2008 19:35:12 +0000
parents 89ac47d91fc1
children 0c117a89f399
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);