Skip to content

Commit

Permalink
Merge pull request #37 from soraxas/feat-follow-redirect
Browse files Browse the repository at this point in the history
Follow redirect when getting 302-like status
  • Loading branch information
johanhelsing authored Nov 30, 2024
2 parents 01dbfc7 + e1b1fda commit 47df93a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/web_asset_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ async fn get<'a>(path: PathBuf) -> Result<Box<Reader<'a>>, 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,
Expand Down

0 comments on commit 47df93a

Please sign in to comment.