mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 06:26:02 -07:00
Set error variable for failed write_data (#1036)
This commit is contained in:
parent
e20ecd2574
commit
415edc237c
1 changed files with 6 additions and 1 deletions
|
@ -5941,7 +5941,12 @@ inline bool ClientImpl::write_request(Stream &strm, Request &req,
|
|||
return write_content_with_provider(strm, req, error);
|
||||
}
|
||||
|
||||
return detail::write_data(strm, req.body.data(), req.body.size());
|
||||
if (!detail::write_data(strm, req.body.data(), req.body.size())) {
|
||||
error = Error::Write;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
inline std::unique_ptr<Response> ClientImpl::send_with_content_provider(
|
||||
|
|
Loading…
Reference in a new issue