Skip to content

Commit a844b00

Browse files
committed
CLEANUP: drop CURLOPT_PUT because it is deprecated
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.
1 parent 89edffc commit a844b00

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.16
1+
1.2.17

src/.build-counter

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2510
1+
2512

src/curl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,10 @@ static CURLcode mir_curl_add_put(struct curl_con *con, const struct mirror *mir)
835835
CURL_ERR_EASY("Failed to set read callback function", retval);
836836
else if ((retval = curl_easy_setopt(con->easy, CURLOPT_UPLOAD, 1L)) != CURLE_OK)
837837
CURL_ERR_EASY("Failed to enable uploading", retval);
838+
#if !CURL_AT_LEAST_VERSION(7, 12, 1)
838839
else if ((retval = curl_easy_setopt(con->easy, CURLOPT_PUT, 1L)) != CURLE_OK)
839840
CURL_ERR_EASY("Failed to init HTTP PUT data", retval);
841+
#endif
840842
else if ((retval = curl_easy_setopt(con->easy, CURLOPT_READDATA, con)) != CURLE_OK)
841843
CURL_ERR_EASY("Failed to set read callback function data", retval);
842844
else if ((retval = curl_easy_setopt(con->easy, CURLOPT_INFILESIZE_LARGE, (curl_off_t)mir->body_size)) != CURLE_OK)

0 commit comments

Comments
 (0)