This commit is contained in:
yhirose 2021-04-05 11:09:08 -04:00
parent 6ff84d34d1
commit 9d3365df54
2 changed files with 61 additions and 0 deletions

View file

@ -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;