You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ph...@apache.org on 2018/04/19 23:34:26 UTC
[1/2] nifi-minifi-cpp git commit: MINIFICPP-456 Including signal.h to
resolve build issues for SecureSocketGetTCPTest in Alpine environments.
Repository: nifi-minifi-cpp
Updated Branches:
refs/heads/master d14db2cbb -> 18e87d2c1
MINIFICPP-456 Including signal.h to resolve build issues for SecureSocketGetTCPTest in Alpine environments.
This closes #303.
Signed-off-by: Marc Parisi <ph...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/4f9fcb72
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/4f9fcb72
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/4f9fcb72
Branch: refs/heads/master
Commit: 4f9fcb727a909a983dba595968c585e827b0c0c7
Parents: d14db2c
Author: Aldrin Piri <al...@apache.org>
Authored: Thu Apr 19 17:16:01 2018 -0400
Committer: Marc Parisi <ph...@apache.org>
Committed: Thu Apr 19 19:29:55 2018 -0400
----------------------------------------------------------------------
libminifi/test/integration/SecureSocketGetTCPTest.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/4f9fcb72/libminifi/test/integration/SecureSocketGetTCPTest.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/integration/SecureSocketGetTCPTest.cpp b/libminifi/test/integration/SecureSocketGetTCPTest.cpp
index 02ea113..f9d4261 100644
--- a/libminifi/test/integration/SecureSocketGetTCPTest.cpp
+++ b/libminifi/test/integration/SecureSocketGetTCPTest.cpp
@@ -15,6 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include <signal.h>
#include <sys/stat.h>
#undef NDEBUG
#include <cassert>
@@ -180,10 +181,6 @@ int main(int argc, char **argv) {
test_file_location = argv[1];
key_dir = argv[2];
}
- bool isSecure = false;
- if (url.find("https") != std::string::npos) {
- isSecure = true;
- }
signal(SIGPIPE, sigpipe_handle);
[2/2] nifi-minifi-cpp git commit: MINIFICPP-460: InvokeHTTP should
handle a missing content type gracefully
Posted by ph...@apache.org.
MINIFICPP-460: InvokeHTTP should handle a missing content type gracefully
This closes #302.
Signed off on github by achristianson
Signed-off-by: Marc Parisi <ph...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/18e87d2c
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/18e87d2c
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/18e87d2c
Branch: refs/heads/master
Commit: 18e87d2c18a136acfae3cc9b7f44cc95b62cf07a
Parents: 4f9fcb7
Author: Marc Parisi <ph...@apache.org>
Authored: Wed Apr 18 15:00:23 2018 -0400
Committer: Marc Parisi <ph...@apache.org>
Committed: Thu Apr 19 19:30:21 2018 -0400
----------------------------------------------------------------------
extensions/http-curl/processors/InvokeHTTP.cpp | 6 ++++--
extensions/http-curl/processors/InvokeHTTP.h | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/18e87d2c/extensions/http-curl/processors/InvokeHTTP.cpp
----------------------------------------------------------------------
diff --git a/extensions/http-curl/processors/InvokeHTTP.cpp b/extensions/http-curl/processors/InvokeHTTP.cpp
index 6b501a8..feda511 100644
--- a/extensions/http-curl/processors/InvokeHTTP.cpp
+++ b/extensions/http-curl/processors/InvokeHTTP.cpp
@@ -52,6 +52,7 @@ namespace processors {
std::shared_ptr<utils::IdGenerator> InvokeHTTP::id_generator_ = utils::IdGenerator::getIdGenerator();
const char *InvokeHTTP::ProcessorName = "InvokeHTTP";
+std::string InvokeHTTP::DefaultContentType = "application/octet-stream";
core::Property InvokeHTTP::Method("HTTP Method", "HTTP request method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS). "
"Arbitrary methods are also supported. Methods other than POST, PUT and PATCH will be sent without a message body.",
@@ -339,8 +340,9 @@ void InvokeHTTP::onTrigger(const std::shared_ptr<core::ProcessContext> &context,
response_flow = std::static_pointer_cast<FlowFileRecord>(session->create());
}
- std::string ct = content_type;
- response_flow->addKeyedAttribute(MIME_TYPE, ct);
+ // if content type isn't returned we should return application/octet-stream
+ // as per RFC 2046 -- 4.5.1
+ response_flow->addKeyedAttribute(MIME_TYPE, content_type ? std::string(content_type) : DefaultContentType);
response_flow->addAttribute(STATUS_CODE, std::to_string(http_code));
if (response_headers.size() > 0)
flowFile->addAttribute(STATUS_MESSAGE, response_headers.at(0));
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/18e87d2c/extensions/http-curl/processors/InvokeHTTP.h
----------------------------------------------------------------------
diff --git a/extensions/http-curl/processors/InvokeHTTP.h b/extensions/http-curl/processors/InvokeHTTP.h
index f1aff50..446cefe 100644
--- a/extensions/http-curl/processors/InvokeHTTP.h
+++ b/extensions/http-curl/processors/InvokeHTTP.h
@@ -20,6 +20,7 @@
#define __INVOKE_HTTP_H__
#include <memory>
+#include <string>
#include <regex>
#include <curl/curl.h>
@@ -67,6 +68,7 @@ class InvokeHTTP : public core::Processor {
virtual ~InvokeHTTP();
// Processor Name
static const char *ProcessorName;
+ static std::string DefaultContentType;
// Supported Properties
static core::Property Method;
static core::Property URL;