mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Fix #889
This commit is contained in:
parent
6ff84d34d1
commit
9d3365df54
2 changed files with 61 additions and 0 deletions
|
@ -5820,6 +5820,9 @@ inline bool ClientImpl::process_request(Stream &strm, Request &req,
|
|||
req.content_receiver
|
||||
? static_cast<ContentReceiverWithProgress>(
|
||||
[&](const char *buf, size_t n, uint64_t off, uint64_t len) {
|
||||
if (300 < res.status && res.status < 400 && follow_location_) {
|
||||
return true;
|
||||
}
|
||||
auto ret = req.content_receiver(buf, n, off, len);
|
||||
if (!ret) { error = Error::Canceled; }
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue