From b7b3b4bd3e54d65ca0a634bd0edf260c7e65cfbd Mon Sep 17 00:00:00 2001 From: henri Date: Mon, 22 Apr 2013 19:32:44 +0000 Subject: [PATCH] Default port is set to -1 (and not zero) when not specified in proxy specification string. --- nsock/src/proxy_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsock/src/proxy_http.c b/nsock/src/proxy_http.c index 0608a0f53..be8600650 100644 --- a/nsock/src/proxy_http.c +++ b/nsock/src/proxy_http.c @@ -91,7 +91,7 @@ int proxy_http_node_new(struct proxy_node **node, const struct uri *uri) { proxy->sslen = sizeof(struct sockaddr_in); - if (uri->port == 0) + if (uri->port == -1) proxy->port = DEFAULT_PROXY_PORT_HTTP; else proxy->port = (unsigned short)uri->port;