nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #610: MINIFICPP-814 - Fixed ListenHTTP and HTTPClient bugs, created tests f…
Date Fri, 12 Jul 2019 12:52:30 GMT
bakaid commented on a change in pull request #610: MINIFICPP-814 - Fixed ListenHTTP and HTTPClient
bugs, created tests f…
URL: https://github.com/apache/nifi-minifi-cpp/pull/610#discussion_r302967587
 
 

 ##########
 File path: extensions/http-curl/client/HTTPClient.cpp
 ##########
 @@ -327,7 +356,9 @@ void HTTPClient::set_request_method(const std::string method) {
   if (my_method == "POST") {
     curl_easy_setopt(http_session_, CURLOPT_POST, 1L);
   } else if (my_method == "PUT") {
-    curl_easy_setopt(http_session_, CURLOPT_PUT, 0L);
+    curl_easy_setopt(http_session_, CURLOPT_UPLOAD, 1L);
+  } else if (my_method == "HEAD") {
+    curl_easy_setopt(http_session_, CURLOPT_NOBODY, 1L);
 
 Review comment:
   Just passing "HEAD" as the CURLOPT_CUSTOMREQUEST will not work, because curl will expect
a response body. CURLOPT_NOBODY is the proper way to do it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message