Add status code accessor to RedirectAttempt (#285)

This commit is contained in:
Mattias Päivärinta
2018-04-16 00:11:50 +02:00
committed by Sean McArthur
parent c00950085c
commit 31504388d7
2 changed files with 44 additions and 14 deletions

View File

@@ -539,7 +539,12 @@ impl Future for PendingRequest {
}
}
self.urls.push(self.url.clone());
let action = check_redirect(&self.client.redirect_policy, &loc, &self.urls);
let action = check_redirect(
&self.client.redirect_policy,
res.status(),
&loc,
&self.urls,
);
match action {
redirect::Action::Follow => {