From: Daniel Stenberg Date: Mon, 9 Nov 2020 00:00:52 +0000 (+0100) Subject: examples/httpput: remove use of CURLOPT_PUT X-Git-Tag: curl-7_74_0~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa6bbbe167873cd5a9d9c42714bf0d1a889c0e9b;p=thirdparty%2Fcurl.git examples/httpput: remove use of CURLOPT_PUT It is deprecated and unnecessary since it already sets CURLOPT_UPLOAD. Reported-by: Jeroen Ooms Fixes #6186 Closes #6187 --- diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c index 303f882088..163600a5b1 100644 --- a/docs/examples/httpput.c +++ b/docs/examples/httpput.c @@ -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);