aboutsummaryrefslogtreecommitdiffstats
path: root/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'http.c')
-rw-r--r--http.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/http.c b/http.c
index ecbc47ea4b..d88e79fbde 100644
--- a/http.c
+++ b/http.c
@@ -1540,9 +1540,9 @@ struct active_request_slot *get_active_slot(void)
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);
/*
@@ -1551,9 +1551,9 @@ struct active_request_slot *get_active_slot(void)
* 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);
@@ -2120,12 +2120,12 @@ static int http_request(const char *url,
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) {
@@ -2151,7 +2151,7 @@ static int http_request(const char *url,
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);
@@ -2170,7 +2170,7 @@ static int http_request(const char *url,
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);
@@ -2750,7 +2750,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
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);