Skip to content

Commit cfd4d27

Browse files
authored
Do not add timeout header if it has already been added (#1330)
1 parent 55f8272 commit cfd4d27

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sdk/core/src/request_options/timeout.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ impl Timeout {
1212

1313
impl AppendToUrlQuery for Timeout {
1414
fn append_to_url_query(&self, url: &mut url::Url) {
15+
if url.query_pairs().any(|(k, _)| k == "timeout") {
16+
return;
17+
}
18+
1519
url.query_pairs_mut()
1620
.append_pair("timeout", &format!("{}", self.0.as_secs()));
1721
}

0 commit comments

Comments
 (0)