summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2016-12-14 22:39:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-15 17:28:37 (GMT)
commitf962ddf6edb199b2611d575a75f60d20d5c137c3 (patch)
tree81b5da0a0ff9d250afc9c26eef239a48e6cd0ff9 /http.c
parent85e42053658cf6710b84974be0ef0acf459a80d9 (diff)
downloadgit-f962ddf6edb199b2611d575a75f60d20d5c137c3.zip
git-f962ddf6edb199b2611d575a75f60d20d5c137c3.tar.gz
git-f962ddf6edb199b2611d575a75f60d20d5c137c3.tar.bz2
http: always warn if libcurl version is too old
Always warn if libcurl version is too old because: 1. Even without a protocol whitelist, newer versions of curl have all non-standard protocols disabled by default. 2. A future patch will introduce default "known-good" and "known-bad" protocols which are allowed/disallowed by 'is_transport_allowed' which older version of libcurl can't respect. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/http.c b/http.c
index 5cd3ffd..034426e 100644
--- a/http.c
+++ b/http.c
@@ -583,9 +583,8 @@ static CURL *get_curl_handle(void)
curl_easy_setopt(result, CURLOPT_REDIR_PROTOCOLS, allowed_protocols);
curl_easy_setopt(result, CURLOPT_PROTOCOLS, allowed_protocols);
#else
- if (transport_restrict_protocols())
- warning("protocol restrictions not applied to curl redirects because\n"
- "your curl version is too old (>= 7.19.4)");
+ warning("protocol restrictions not applied to curl redirects because\n"
+ "your curl version is too old (>= 7.19.4)");
#endif
if (getenv("GIT_CURL_VERBOSE"))