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
This commit is contained in:
9
http.c
9
http.c
@ -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
|
||||
|
Reference in New Issue
Block a user