Revert deletions of client_error and friends.
This commit is contained in:
committed by
Martin Algesten
parent
64ebd47979
commit
18a9b08973
@@ -231,7 +231,7 @@ pub(crate) fn connect(
|
||||
save_cookies(&unit, &resp);
|
||||
|
||||
// handle redirects
|
||||
if resp.status() >= 300 && resp.status() < 400 && unit.agent.config.redirects > 0 {
|
||||
if resp.redirect() && unit.agent.config.redirects > 0 {
|
||||
if redirect_count == unit.agent.config.redirects {
|
||||
return Err(ErrorKind::TooManyRedirects.new());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user