Added custom redirect policy
This commit is contained in:
parent
82f577c17d
commit
d0c5764471
@ -39,7 +39,8 @@ fn download_into(
|
|||||||
) -> Result<String> {
|
) -> Result<String> {
|
||||||
info!("GET request to: {}", url);
|
info!("GET request to: {}", url);
|
||||||
// Haven't included the loop check as
|
// Haven't included the loop check as
|
||||||
// Steal the Stars
|
// Steal the Stars would tigger it as
|
||||||
|
// it has a loop back before giving correct url
|
||||||
let policy = RedirectPolicy::custom(|attempt| {
|
let policy = RedirectPolicy::custom(|attempt| {
|
||||||
info!("Redirect Attempt URL: {:?}", attempt.url());
|
info!("Redirect Attempt URL: {:?}", attempt.url());
|
||||||
if attempt.previous().len() > 10 {
|
if attempt.previous().len() > 10 {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user