This is an automated email from the ASF dual-hosted git repository.

aboda pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 1ae4ee5  MINIFICPP-1357 - Fix proxy port reading of InvokeHTTP
1ae4ee5 is described below

commit 1ae4ee528f1c4111628f37967760ae475cadd4a8
Author: Gabor Gyimesi <[email protected]>
AuthorDate: Tue Sep 8 13:54:00 2020 +0200

    MINIFICPP-1357 - Fix proxy port reading of InvokeHTTP
    
    Signed-off-by: Arpad Boda <[email protected]>
    
    This closes #899
---
 extensions/http-curl/processors/InvokeHTTP.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/extensions/http-curl/processors/InvokeHTTP.cpp 
b/extensions/http-curl/processors/InvokeHTTP.cpp
index 4dc4744..5a6dc6b 100644
--- a/extensions/http-curl/processors/InvokeHTTP.cpp
+++ b/extensions/http-curl/processors/InvokeHTTP.cpp
@@ -251,7 +251,10 @@ void InvokeHTTP::onSchedule(const 
std::shared_ptr<core::ProcessContext> &context
 
   proxy_ = {};
   context->getProperty(ProxyHost.getName(), proxy_.host);
-  context->getProperty(ProxyPort.getName(), proxy_.port);
+  std::string port_str;
+  if (context->getProperty(ProxyPort.getName(), port_str) && 
!port_str.empty()) {
+    core::Property::StringToInt(port_str, proxy_.port);
+  }
   context->getProperty(ProxyUsername.getName(), proxy_.username);
   context->getProperty(ProxyPassword.getName(), proxy_.password);
 }

Reply via email to