This commit is contained in:
yhirose 2018-11-30 21:18:35 -05:00
parent 5ad4311fb0
commit 86b3dfc480
2 changed files with 21 additions and 6 deletions

View file

@ -2068,12 +2068,7 @@ inline void Client::write_request(Stream& strm, Request& req)
// Body
if (!req.body.empty()) {
if (req.get_header_value("Content-Type") == "application/x-www-form-urlencoded") {
auto str = detail::encode_url(req.body);
bstrm.write(str.c_str(), str.size());
} else {
bstrm.write(req.body.c_str(), req.body.size());
}
bstrm.write(req.body.c_str(), req.body.size());
}
// Flush buffer