diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-01-20 15:36:21 -0800 |
|---|---|---|
| committer | Johannes Schindelin <johannes.schindelin@gmx.de> | 2023-03-22 18:00:36 +0100 |
| commit | 3c7896e36202c09a5f124730b40f243ae94ffa62 (patch) | |
| tree | 997c6cd5bdb32826965768e751006693527795cb /http-push.c | |
| parent | 6f5ff3aa31fcf4d96b9fcd029fb37240f00a13a5 (diff) | |
| parent | 07f91e5e79810a8f17de745d2d84c384add75f0a (diff) | |
| download | git-3c7896e36202c09a5f124730b40f243ae94ffa62.tar.gz | |
Merge branch 'backport/jk/curl-avoid-deprecated-api' into maint-2.30
Deal with a few deprecation warning from cURL library.
* jk/curl-avoid-deprecated-api:
http: support CURLOPT_PROTOCOLS_STR
http: prefer CURLOPT_SEEKFUNCTION to CURLOPT_IOCTLFUNCTION
http-push: prefer CURLOPT_UPLOAD to CURLOPT_PUT
Diffstat (limited to 'http-push.c')
| -rw-r--r-- | http-push.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http-push.c b/http-push.c index 6a4a43e07f..756779bb19 100644 --- a/http-push.c +++ b/http-push.c @@ -198,14 +198,14 @@ static void curl_setup_http(CURL *curl, const char *url, const char *custom_req, struct buffer *buffer, curl_write_callback write_fn) { - curl_easy_setopt(curl, CURLOPT_PUT, 1); + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); 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_READFUNCTION, fread_buffer); -#ifndef NO_CURL_IOCTL - curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctl_buffer); - curl_easy_setopt(curl, CURLOPT_IOCTLDATA, buffer); +#ifndef NO_CURL_SEEK + curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, seek_buffer); + curl_easy_setopt(curl, CURLOPT_SEEKDATA, buffer); #endif curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_fn); curl_easy_setopt(curl, CURLOPT_NOBODY, 0); |
