From d0c5764471aad83da7cc350893550c9a81cf09a0 Mon Sep 17 00:00:00 2001 From: James Wykeham-Martin Date: Fri, 2 Feb 2018 09:40:13 +0000 Subject: [PATCH] Added custom redirect policy --- hammond-downloader/src/downloader.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hammond-downloader/src/downloader.rs b/hammond-downloader/src/downloader.rs index 5ecdc64..cf614fc 100644 --- a/hammond-downloader/src/downloader.rs +++ b/hammond-downloader/src/downloader.rs @@ -39,7 +39,8 @@ fn download_into( ) -> Result { info!("GET request to: {}", url); // 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| { info!("Redirect Attempt URL: {:?}", attempt.url()); if attempt.previous().len() > 10 {