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_r305251975
##########
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 understand that this is not a complete client, and that HEAD requests have
not been previously used in the code. However, to test the HEAD functionality
of ListenHTTP it has to be added now.
I think it would be best to discuss curlpp in the issue you created. I have
not used it, and in general just adding another layer of API which we can be
use either properly or badly is not a solution in itself - I will have to
review the project to decide for myself whether it would have significant
advantages over just using the curl API.
What I am sure I don't want to do is introduce a new, untested thirdparty
dependency in 0.6.1, and as this is a very trivial fix in the client, I don't
think it warrants that.
----------------------------------------------------------------
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