Skip to content

Commit

Permalink
examples/httpput: remove use of CURLOPT_PUT
Browse files Browse the repository at this point in the history
It is deprecated and unnecessary since it already sets CURLOPT_UPLOAD.

Reported-by: Jeroen Ooms
Fixes #6186
Closes #6187
  • Loading branch information
bagder committed Nov 9, 2020
1 parent a570f7c commit fa6bbbe
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions docs/examples/httpput.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,9 @@ int main(int argc, char **argv)
/* we want to use our own read function */
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);

/* enable uploading */
/* enable uploading (implies PUT over HTTP) */
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);

/* HTTP PUT please */
curl_easy_setopt(curl, CURLOPT_PUT, 1L);

/* specify target URL, and note that this URL should include a file
name, not only a directory */
curl_easy_setopt(curl, CURLOPT_URL, url);
Expand Down

0 comments on commit fa6bbbe

Please sign in to comment.