Follow 307/308 redirects
This commit is contained in:
committed by
Martin Algesten
parent
7afc4b04f3
commit
8d21052c7e
@@ -263,9 +263,13 @@ pub(crate) fn connect(
|
||||
debug!("redirect {} {} -> {}", resp.status(), url, new_url);
|
||||
return connect(new_unit, use_pooled, redirect_count + 1, empty, true);
|
||||
}
|
||||
// never change the method for 307/308
|
||||
307 | 308 => {
|
||||
let empty = Payload::Empty.into_read();
|
||||
debug!("redirect {} {} -> {}", resp.status(), url, new_url);
|
||||
return connect(unit, use_pooled, redirect_count - 1, empty, true);
|
||||
}
|
||||
_ => (),
|
||||
// reinstate this with expect-100
|
||||
// 307 | 308 | _ => connect(unit, method, use_pooled, redirects - 1, body),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user