phrocker 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_r304567878
 
 

 ##########
 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:
   I don't think HEAD was ever completed in the client -- this is not a fully 
complete client and I was hoping we'd switch to 
https://github.com/jpbarrette/curlpp, where we simply wrapped their code in our 
HTTPClient. As per the comment, above, do you think this is advantageous? My 
hope was that we'd do that for 1.0, but if there is consensus maybe we should 
use their client sooner, especially since cycles to fix bugs ( known and not 
known ) in our http client seem wasteful. Wrapping curlpp may be ultimately the 
best solutions.
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to