]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
examples/httpput: remove use of CURLOPT_PUT
authorDaniel Stenberg <daniel@haxx.se>
Mon, 9 Nov 2020 00:00:52 +0000 (01:00 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 9 Nov 2020 07:25:14 +0000 (08:25 +0100)
It is deprecated and unnecessary since it already sets CURLOPT_UPLOAD.

Reported-by: Jeroen Ooms
Fixes #6186
Closes #6187

docs/examples/httpput.c

index 303f88208857b885d4e980d81dc3aadca3139831..163600a5b160c67d9945ab4d2fe858b9c4322416 100644 (file)
@@ -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);