diff options
author | Mauro Sardara <msardara+fdio@cisco.com> | 2017-07-12 14:59:11 +0200 |
---|---|---|
committer | Mauro Sardara <msardara+fdio@cisco.com> | 2017-07-12 14:59:11 +0200 |
commit | 502ab229d8efde8b39be673e0f0b091e61c33a25 (patch) | |
tree | c93259c3603ae3b3a6a700aa416eab1a0fba9e62 /icnet | |
parent | 5bae941c8b65a177f84adcbbb6f8643055ba002d (diff) |
Adding additional check for MAC OS
Change-Id: I4defac2f9de374c5f54ad69eed032da492248003
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'icnet')
-rw-r--r-- | icnet/http/icnet_http_request.cc | 5 |
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(); } |