aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-07-12 14:59:11 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-07-12 14:59:11 +0200
commit502ab229d8efde8b39be673e0f0b091e61c33a25 (patch)
treec93259c3603ae3b3a6a700aa416eab1a0fba9e62
parent5bae941c8b65a177f84adcbbb6f8643055ba002d (diff)
Adding additional check for MAC OS
Change-Id: I4defac2f9de374c5f54ad69eed032da492248003 Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
-rw-r--r--icnet/http/icnet_http_request.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/icnet/http/icnet_http_request.cc b/icnet/http/icnet_http_request.cc
index cd0c512f..f793e893 100644
--- a/icnet/http/icnet_http_request.cc
+++ b/icnet/http/icnet_http_request.cc
@@ -59,7 +59,10 @@ HTTPRequest::HTTPRequest(HTTPMethod method, std::string &url, HTTPHeaders &heade
stream << item.first << ": " << item.second << "\r\n";
}
stream << "\r\n";
- stream << payload.data();
+
+ if (payload.size() > 0) {
+ stream << payload.data();
+ }
request_string_ = stream.str();
}