This commit is contained in:
yhirose committed 2019-03-28 19:56:32 -04:00
1 parent acc5e5a450
commit 8483e5931f
2 files changed
+17 -2

No files matched your search

+4 -2
View File
@@ -2119,8 +2119,10 @@ inline void Client::write_request(Stream& strm, Request& req)
req.set_header("Content-Type", "text/plain");
}
auto length = std::to_string(req.body.size());
req.set_header("Content-Length", length.c_str());
if (!req.has_header("Content-Length")) {
auto length = std::to_string(req.body.size());
req.set_header("Content-Length", length.c_str());
}
}
detail::write_headers(bstrm, req);