You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/01/10 02:31:36 UTC

[GitHub] asfgit closed pull request #469: MINIFICPP-705: Previous fix for some travis failures. Will help isola…

asfgit closed pull request #469: MINIFICPP-705: Previous fix for some travis failures. Will help isola…
URL: https://github.com/apache/nifi-minifi-cpp/pull/469
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/extensions/civetweb/processors/ListenHTTP.cpp b/extensions/civetweb/processors/ListenHTTP.cpp
index 210ae1c3..469915eb 100644
--- a/extensions/civetweb/processors/ListenHTTP.cpp
+++ b/extensions/civetweb/processors/ListenHTTP.cpp
@@ -276,6 +276,10 @@ void ListenHTTP::Handler::set_header_attributes(const mg_request_info *req_info,
 
 bool ListenHTTP::Handler::handlePost(CivetServer *server, struct mg_connection *conn) {
   auto req_info = mg_get_request_info(conn);
+  if (!req_info) {
+      logger_->log_error("ListenHTTP handling POST resulted in a null request");
+      return false;
+  }
   logger_->log_debug("ListenHTTP handling POST request of length %ll", req_info->content_length);
 
   if (!auth_request(conn, req_info)) {
@@ -335,6 +339,10 @@ bool ListenHTTP::Handler::auth_request(mg_connection *conn, const mg_request_inf
 
 bool ListenHTTP::Handler::handleGet(CivetServer *server, struct mg_connection *conn) {
   auto req_info = mg_get_request_info(conn);
+  if (!req_info) {
+      logger_->log_error("ListenHTTP handling GET resulted in a null request");
+      return false;
+  }
   logger_->log_debug("ListenHTTP handling GET request of URI %s", req_info->request_uri);
 
   if (!auth_request(conn, req_info)) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services