diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-02-24 13:25:54 -0800 | 
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-02-24 13:25:54 -0800 | 
| commit | e84d5e9fa178a027b1c8b9f6e22c9173dcda03b3 (patch) | |
| tree | b3d16c3076cb8bce048c54e331e86f56e0c0533b /http.c | |
| parent | 8020803f5057601c1c29ffcdbd309905bd26eef7 (diff) | |
| parent | c915f11eb4922e154e29cf62d3b549d65c06a170 (diff) | |
| download | git-e84d5e9fa178a027b1c8b9f6e22c9173dcda03b3.tar.gz | |
Merge branch 'ew/force-ipv4'
"git fetch" and friends that make network connections can now be
told to only use ipv4 (or ipv6).
* ew/force-ipv4:
  connect & http: support -4 and -6 switches for remote operations
Diffstat (limited to 'http.c')
| -rw-r--r-- | http.c | 9 | 
1 files changed, 9 insertions, 0 deletions
@@ -11,6 +11,11 @@  #include "gettext.h"  #include "transport.h" +#if LIBCURL_VERSION_NUM >= 0x070a08 +long int git_curl_ipresolve = CURL_IPRESOLVE_WHATEVER; +#else +long int git_curl_ipresolve; +#endif  int active_requests;  int http_is_verbose;  size_t http_post_buffer = 16 * LARGE_PACKET_MAX; @@ -824,6 +829,10 @@ struct active_request_slot *get_active_slot(void)  	curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);  	curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1);  	curl_easy_setopt(slot->curl, CURLOPT_RANGE, NULL); + +#if LIBCURL_VERSION_NUM >= 0x070a08 +	curl_easy_setopt(slot->curl, CURLOPT_IPRESOLVE, git_curl_ipresolve); +#endif  #ifdef LIBCURL_CAN_HANDLE_AUTH_ANY  	curl_easy_setopt(slot->curl, CURLOPT_HTTPAUTH, http_auth_methods);  #endif  | 
