Skip to content

Commit

Permalink
feat(core): implement max_redirections for attohttpc, ref #4795 (#4811)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Jul 31, 2022
1 parent 0ad9531 commit ba5560b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/attohttpc-max-redirections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Implement `api::http::ClientBuilder::max_redirections` for the default attohttpc client.
4 changes: 4 additions & 0 deletions core/tauri/src/api/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ impl Client {
}
}

if let Some(max_redirections) = self.0.max_redirections {
request_builder = request_builder.max_redirections(max_redirections as u32);
}

if let Some(timeout) = request.timeout {
request_builder = request_builder.timeout(timeout);
#[cfg(windows)]
Expand Down

0 comments on commit ba5560b

Please sign in to comment.