diff src/http/modules/ngx_http_uwsgi_module.c @ 6303:a93345ee8f52

Upstream: fixed "no port" detection in evaluated upstreams. If an upstream with variables evaluated to address without a port, then instead of a "no port in upstream" error an attempt was made to connect() which failed with EADDRNOTAVAIL.
author Ruslan Ermilov <ru@nginx.com>
date Sat, 21 Nov 2015 10:44:07 +0300
parents b2899e7d0ef8
children 91c8d990fb45
line wrap: on
line diff
--- a/src/http/modules/ngx_http_uwsgi_module.c
+++ b/src/http/modules/ngx_http_uwsgi_module.c
@@ -771,10 +771,11 @@ ngx_http_uwsgi_eval(ngx_http_request_t *
 
     } else {
         u->resolved->host = url.host;
-        u->resolved->port = url.port;
-        u->resolved->no_port = url.no_port;
     }
 
+    u->resolved->port = url.port;
+    u->resolved->no_port = url.no_port;
+
     return NGX_OK;
 }