arpadboda commented on a change in pull request #786:
URL: https://github.com/apache/nifi-minifi-cpp/pull/786#discussion_r425865244



##########
File path: extensions/http-curl/tests/HTTPHandlers.h
##########
@@ -206,25 +207,36 @@ class FlowFileResponder : public CivetHandler {
       minifi::io::CivetStream civet_stream(conn);
       minifi::io::CRCStream < minifi::io::CivetStream > stream(&civet_stream);
       uint32_t num_attributes;
+      int read;
       uint64_t total_size = 0;
-      total_size += stream.read(num_attributes);
+      read = stream.read(num_attributes);
+      if(!isServerRunning())return false;

Review comment:
       Why?
   
   I would expect not even trying to read the stream when the server is not 
running. 

##########
File path: extensions/http-curl/client/HTTPStream.h
##########
@@ -155,13 +155,13 @@ class HttpStream : public io::BaseStream {
  protected:
 
   /**
-   * Creates a vector and returns the vector using the provided
-   * type name.
+   * Populates the vector using the provided type name.
+   * @param buf output buffer
    * @param t incoming object
-   * @returns vector.
+   * @returns number of bytes read.
    */
   template<typename T>
-  std::vector<uint8_t> readBuffer(const T&);
+  int readBuffer(std::vector<uint8_t>&, const T&);

Review comment:
       I didn't check the code of BaseStream, just to confirm: the original 
function was declared at this level and it's not an override of a base func? 




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


Reply via email to