adamdebreceni commented on code in PR #2088:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2088#discussion_r2732121215


##########
libminifi/src/c2/C2Agent.cpp:
##########
@@ -1012,9 +1021,18 @@ std::optional<std::string> C2Agent::fetchFlow(const 
std::string& uri) const {
     return std::nullopt;
   }
 
-  C2Payload response = protocol_->fetch(resolved_url.value(), 
update_sink_->getSupportedConfigurationFormats());
+  std::string flow_content;
+  bool success = protocol_->fetch(resolved_url.value(), 
update_sink_->getSupportedConfigurationFormats(), [&] (std::span<const char> 
chunk) {
+    flow_content.append(chunk.data(), chunk.size());
+    return true;

Review Comment:
   we will load the flow into memory when processing it anyway



##########
core-framework/include/http/HTTPStream.h:
##########
@@ -115,9 +115,9 @@ class HttpStream : public io::BaseStreamImpl {
 
   inline bool isFinished(int seconds = 0) {
     return http_client_future_.wait_for(std::chrono::seconds(seconds)) == 
std::future_status::ready
-        && http_client_->getReadCallback()
-        && http_client_->getReadCallback()->getSize() == 0
-        && http_client_->getReadCallback()->waitingOps();
+        && 
dynamic_cast<utils::ByteOutputCallback*>(http_client_->getReadCallback())
+        && 
dynamic_cast<utils::ByteOutputCallback*>(http_client_->getReadCallback())->getSize()
 == 0
+        && 
dynamic_cast<utils::ByteOutputCallback*>(http_client_->getReadCallback())->waitingOps();

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to