Skip to content

Commit ba5560b

Browse files
authored
feat(core): implement max_redirections for attohttpc, ref #4795 (#4811)
1 parent 0ad9531 commit ba5560b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Implement `api::http::ClientBuilder::max_redirections` for the default attohttpc client.

core/tauri/src/api/http.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ impl Client {
141141
}
142142
}
143143

144+
if let Some(max_redirections) = self.0.max_redirections {
145+
request_builder = request_builder.max_redirections(max_redirections as u32);
146+
}
147+
144148
if let Some(timeout) = request.timeout {
145149
request_builder = request_builder.timeout(timeout);
146150
#[cfg(windows)]

0 commit comments

Comments
 (0)