diff options
-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(); } |