Skip to content

Commit

Permalink
CLEANUP: drop CURLOPT_PUT because it is deprecated
Browse files Browse the repository at this point in the history
CURLOPT_UPLOAD should be used instead of CURLOPT_PUT.  In fact,
CURLOPT_UPLOAD is also used in source, so CURLOPT_PUT is unnecessary
even before it was deprecated.

Version of the program changed to v1.2.17.
  • Loading branch information
zaga00 committed Sep 4, 2023
1 parent 89edffc commit a844b00
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.16
1.2.17
2 changes: 1 addition & 1 deletion src/.build-counter
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2510
2512
2 changes: 2 additions & 0 deletions src/curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,10 @@ static CURLcode mir_curl_add_put(struct curl_con *con, const struct mirror *mir)
CURL_ERR_EASY("Failed to set read callback function", retval);
else if ((retval = curl_easy_setopt(con->easy, CURLOPT_UPLOAD, 1L)) != CURLE_OK)
CURL_ERR_EASY("Failed to enable uploading", retval);
#if !CURL_AT_LEAST_VERSION(7, 12, 1)
else if ((retval = curl_easy_setopt(con->easy, CURLOPT_PUT, 1L)) != CURLE_OK)
CURL_ERR_EASY("Failed to init HTTP PUT data", retval);
#endif
else if ((retval = curl_easy_setopt(con->easy, CURLOPT_READDATA, con)) != CURLE_OK)
CURL_ERR_EASY("Failed to set read callback function data", retval);
else if ((retval = curl_easy_setopt(con->easy, CURLOPT_INFILESIZE_LARGE, (curl_off_t)mir->body_size)) != CURLE_OK)
Expand Down

0 comments on commit a844b00

Please sign in to comment.