summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-11-09 01:00:52 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-11-09 08:25:14 +0100
commitfa6bbbe167873cd5a9d9c42714bf0d1a889c0e9b (patch)
tree63e1a7793d8a2150165c0bf89c3ad0f2f5092fdd
parenta570f7cd09f05657fd8521e833e149f7639e25a8 (diff)
downloadcurl-fa6bbbe167873cd5a9d9c42714bf0d1a889c0e9b.tar.gz
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
-rw-r--r--docs/examples/httpput.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c
index 303f88208..163600a5b 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);