builtin/apply: avoid parameter shadowing 'linenr' global
[gitweb.git] / http.c
diff --git a/http.c b/http.c
index aae9944cb9187bd0821c2bfbd55025a4235b9aff..985b995c1d05b9a1ae461d6056e14e66b39d563c 100644 (file)
--- a/http.c
+++ b/http.c
@@ -619,7 +619,10 @@ static CURL *get_curl_handle(void)
        if (curl_http_proxy) {
                curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);
 #if LIBCURL_VERSION_NUM >= 0x071800
-               if (starts_with(curl_http_proxy, "socks5"))
+               if (starts_with(curl_http_proxy, "socks5h"))
+                       curl_easy_setopt(result,
+                               CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
+               else if (starts_with(curl_http_proxy, "socks5"))
                        curl_easy_setopt(result,
                                CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
                else if (starts_with(curl_http_proxy, "socks4a"))