Merge branch 'ab/http-drop-old-curl'
Support for ancient versions of cURL library (pre 7.19.4) has been dropped. * ab/http-drop-old-curl: http: rename CURLOPT_FILE to CURLOPT_WRITEDATA http: drop support for curl < 7.19.3 and < 7.17.0 (again) http: drop support for curl < 7.19.4 http: drop support for curl < 7.16.0 http: drop support for curl < 7.11.1
This commit is contained in:
@ -185,8 +185,6 @@ static int set_option(const char *name, const char *value)
|
||||
strbuf_detach(&unquoted, NULL));
|
||||
}
|
||||
return 0;
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a08
|
||||
} else if (!strcmp(name, "family")) {
|
||||
if (!strcmp(value, "ipv4"))
|
||||
git_curl_ipresolve = CURL_IPRESOLVE_V4;
|
||||
@ -197,7 +195,6 @@ static int set_option(const char *name, const char *value)
|
||||
else
|
||||
return -1;
|
||||
return 0;
|
||||
#endif /* LIBCURL_VERSION_NUM >= 0x070a08 */
|
||||
} else if (!strcmp(name, "from-promisor")) {
|
||||
options.from_promisor = 1;
|
||||
return 0;
|
||||
@ -709,7 +706,6 @@ static size_t rpc_out(void *ptr, size_t eltsize,
|
||||
return avail;
|
||||
}
|
||||
|
||||
#ifndef NO_CURL_IOCTL
|
||||
static curlioerr rpc_ioctl(CURL *handle, int cmd, void *clientp)
|
||||
{
|
||||
struct rpc_state *rpc = clientp;
|
||||
@ -730,7 +726,6 @@ static curlioerr rpc_ioctl(CURL *handle, int cmd, void *clientp)
|
||||
return CURLIOE_UNKNOWNCMD;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
struct check_pktline_state {
|
||||
char len_buf[4];
|
||||
@ -858,7 +853,7 @@ static int probe_rpc(struct rpc_state *rpc, struct slot_results *results)
|
||||
curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, 4);
|
||||
curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, headers);
|
||||
curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_buffer);
|
||||
curl_easy_setopt(slot->curl, CURLOPT_FILE, &buf);
|
||||
curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, &buf);
|
||||
|
||||
err = run_slot(slot, results);
|
||||
|
||||
@ -949,10 +944,8 @@ retry:
|
||||
rpc->initial_buffer = 1;
|
||||
curl_easy_setopt(slot->curl, CURLOPT_READFUNCTION, rpc_out);
|
||||
curl_easy_setopt(slot->curl, CURLOPT_INFILE, rpc);
|
||||
#ifndef NO_CURL_IOCTL
|
||||
curl_easy_setopt(slot->curl, CURLOPT_IOCTLFUNCTION, rpc_ioctl);
|
||||
curl_easy_setopt(slot->curl, CURLOPT_IOCTLDATA, rpc);
|
||||
#endif
|
||||
if (options.verbosity > 1) {
|
||||
fprintf(stderr, "POST %s (chunked)\n", rpc->service_name);
|
||||
fflush(stderr);
|
||||
@ -1023,7 +1016,7 @@ retry:
|
||||
rpc_in_data.slot = slot;
|
||||
rpc_in_data.check_pktline = stateless_connect;
|
||||
memset(&rpc_in_data.pktline_state, 0, sizeof(rpc_in_data.pktline_state));
|
||||
curl_easy_setopt(slot->curl, CURLOPT_FILE, &rpc_in_data);
|
||||
curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, &rpc_in_data);
|
||||
curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user