const char *custom_req, struct buffer *buffer,
curl_write_callback write_fn)
{
- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_INFILE, buffer);
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer->buf.len);
curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, seek_buffer);
curl_easy_setopt(curl, CURLOPT_SEEKDATA, buffer);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_fn);
- curl_easy_setopt(curl, CURLOPT_NOBODY, 0);
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 0L);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, custom_req);
- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
}
static struct curl_slist *get_dav_token_headers(struct remote_lock *lock, enum dav_header_flag options)
curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, NULL);
curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDS, NULL);
curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, -1L);
- curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0);
- curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
- curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0L);
+ curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1L);
+ curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1L);
curl_easy_setopt(slot->curl, CURLOPT_RANGE, NULL);
/*
* HTTP_FOLLOW_* cases themselves.
*/
if (http_follow_config == HTTP_FOLLOW_ALWAYS)
- curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1L);
else
- curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 0);
+ curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 0L);
curl_easy_setopt(slot->curl, CURLOPT_IPRESOLVE, git_curl_ipresolve);
curl_easy_setopt(slot->curl, CURLOPT_HTTPAUTH, http_auth_methods);
int ret;
slot = get_active_slot();
- curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1L);
if (!result) {
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 1L);
} else {
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0L);
curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, result);
if (target == HTTP_REQUEST_FILE) {
strbuf_addstr(&buf, " no-cache");
if (options && options->initial_request &&
http_follow_config == HTTP_FOLLOW_INITIAL)
- curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1L);
headers = curl_slist_append(headers, buf.buf);
curl_easy_setopt(slot->curl, CURLOPT_URL, url);
curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(slot->curl, CURLOPT_ENCODING, "");
- curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0);
+ curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0L);
ret = run_one_slot(slot, &results);
freq->headers = object_request_headers();
curl_easy_setopt(freq->slot->curl, CURLOPT_WRITEDATA, freq);
- curl_easy_setopt(freq->slot->curl, CURLOPT_FAILONERROR, 0);
+ curl_easy_setopt(freq->slot->curl, CURLOPT_FAILONERROR, 0L);
curl_easy_setopt(freq->slot->curl, CURLOPT_WRITEFUNCTION, fwrite_sha1_file);
curl_easy_setopt(freq->slot->curl, CURLOPT_ERRORBUFFER, freq->errorstr);
curl_easy_setopt(freq->slot->curl, CURLOPT_URL, freq->url);
slot = get_active_slot();
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
- curl_easy_setopt(slot->curl, CURLOPT_POST, 1);
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0L);
+ curl_easy_setopt(slot->curl, CURLOPT_POST, 1L);
curl_easy_setopt(slot->curl, CURLOPT_URL, rpc->service_url);
curl_easy_setopt(slot->curl, CURLOPT_ENCODING, "");
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_WRITEDATA, &rpc_in_data);
- curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0);
+ curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0L);
rpc->any_written = 0;