arpadboda commented on a change in pull request #620: MINIFICPP-996 - Output 
port keeps printing info message implying tran…
URL: https://github.com/apache/nifi-minifi-cpp/pull/620#discussion_r313005571
 
 

 ##########
 File path: extensions/http-curl/sitetosite/HTTPProtocol.cpp
 ##########
 @@ -63,7 +63,16 @@ std::shared_ptr<Transaction> 
HttpSiteToSiteClient::createTransaction(std::string
   client->submit();
   if (peer_->getStream() != nullptr)
     logger_->log_debug("Closing %s", ((io::HttpStream*) 
peer_->getStream())->getClientRef()->getURL());
-  if (client->getResponseCode() == 201) {
+  uint64_t  client_response = client->getResponseCode();
+  if (direction == RECEIVE && client_response == 200) {
 
 Review comment:
   This case cannot occur at the moment as NiFi handles this improperly.
   When fixed and tested in scope of https://github.com/apache/nifi/pull/3647 I 
found that we throw exception and execute rollback in case 200 is received, 
even though it's a valid case, 200 is not an error.
   Transaction being null is for error cases, so this function now creates a 
dummy transaction, which then gets removed and the happy path is executed. 
(transfer was successful)

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