From 502ab229d8efde8b39be673e0f0b091e61c33a25 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Wed, 12 Jul 2017 14:59:11 +0200 Subject: Adding additional check for MAC OS Change-Id: I4defac2f9de374c5f54ad69eed032da492248003 Signed-off-by: Mauro Sardara --- icnet/http/icnet_http_request.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } -- cgit 1.2.3-korg