Skip to content

Commit 6d54c6b

Browse files
peffdscho
authored andcommitted
http-push: prefer CURLOPT_UPLOAD to CURLOPT_PUT
The two options do exactly the same thing, but the latter has been deprecated and in recent versions of curl may produce a compiler warning. Since the UPLOAD form is available everywhere (it was introduced in the year 2000 by curl 7.1), we can just switch to it. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 7360767 commit 6d54c6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http-push.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static void curl_setup_http(CURL *curl, const char *url,
198198
const char *custom_req, struct buffer *buffer,
199199
curl_write_callback write_fn)
200200
{
201-
curl_easy_setopt(curl, CURLOPT_PUT, 1);
201+
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
202202
curl_easy_setopt(curl, CURLOPT_URL, url);
203203
curl_easy_setopt(curl, CURLOPT_INFILE, buffer);
204204
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer->buf.len);

0 commit comments

Comments
 (0)