Skip to content

Commit 39d418c

Browse files
fix: failing test due to duplicate url in history
avoid duplicating `self.url` in `self.history` in Response This fixes test_redirect_policy_can_stop_redirects_without_an_error()
1 parent c6a1e2d commit 39d418c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/async_impl/client.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2839,6 +2839,8 @@ impl Future for PendingRequest {
28392839
continue;
28402840
}
28412841
redirect::ActionKind::Stop => {
2842+
// Remove the last url from the history as it is already in self.url
2843+
self.as_mut().urls().pop();
28422844
debug!("redirect policy disallowed redirection to '{loc}'");
28432845
}
28442846
redirect::ActionKind::Error(err) => {

0 commit comments

Comments
 (0)