[
https://issues.apache.org/jira/browse/MINIFICPP-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223135#comment-16223135
]
ASF GitHub Bot commented on MINIFICPP-60:
-----------------------------------------
Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/158#discussion_r147542555
--- Diff: extensions/http-curl/client/HTTPClient.cpp ---
@@ -175,19 +201,53 @@ bool HTTPClient::submit() {
curl_easy_setopt(http_session_, CURLOPT_URL, url_.c_str());
logger_->log_info("Submitting to %s", url_);
- curl_easy_setopt(http_session_, CURLOPT_WRITEFUNCTION,
&utils::HTTPRequestResponse::recieve_write);
- curl_easy_setopt(http_session_, CURLOPT_WRITEDATA,
static_cast<void*>(&content_));
-
+ if (callback == nullptr) {
+ content_.ptr = &read_callback_;
+ curl_easy_setopt(http_session_, CURLOPT_WRITEFUNCTION,
&utils::HTTPRequestResponse::recieve_write);
+ curl_easy_setopt(http_session_, CURLOPT_WRITEDATA,
static_cast<void*>(&content_));
+ }
curl_easy_setopt(http_session_, CURLOPT_HEADERFUNCTION,
&utils::HTTPHeaderResponse::receive_headers);
curl_easy_setopt(http_session_, CURLOPT_HEADERDATA,
static_cast<void*>(&header_response_));
-
+ curl_easy_setopt(http_session_, CURLOPT_TCP_KEEPALIVE, 0L);
--- End diff --
This shouldn't be necessary.
> Support HTTP(s) as transport mechanism for Site to Site
> -------------------------------------------------------
>
> Key: MINIFICPP-60
> URL: https://issues.apache.org/jira/browse/MINIFICPP-60
> Project: NiFi MiNiFi C++
> Issue Type: Improvement
> Reporter: Aldrin Piri
> Assignee: marco polo
>
> The C++ implementation would benefit from having an HTTP(S) implementation of
> Site to Site as was described in
> https://cwiki.apache.org/confluence/display/NIFI/Support+HTTP(S)+as+a+transport+mechanism+for+Site-to-Site
> and performed in NIFI-1857
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)