From e1b1fdadb9645456063597f9d6c929e4cc558829 Mon Sep 17 00:00:00 2001 From: Tin Lai Date: Wed, 27 Nov 2024 09:38:53 +1000 Subject: [PATCH] follow redirect when getting 302-like status Signed-off-by: Tin Lai --- src/web_asset_source.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/web_asset_source.rs b/src/web_asset_source.rs index c024fe7..cc4ec29 100644 --- a/src/web_asset_source.rs +++ b/src/web_asset_source.rs @@ -113,7 +113,9 @@ async fn get<'a>(path: PathBuf) -> Result>, AssetReaderError> { .into(), ) })?; - let mut response = ContinuousPoll(surf::get(str_path)).await.map_err(|err| { + + let client = surf::Client::new().with(surf::middleware::Redirect::default()); + let mut response = ContinuousPoll(client.get(str_path)).await.map_err(|err| { AssetReaderError::Io( io::Error::new( io::ErrorKind::Other,