Skip to content

Only add params if they don't already exist #875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion sdk/storage/src/core/clients/storage_account_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,15 @@ impl StorageAccountClient {
// if we have a SAS token (in form of query pairs), let's add it to the url here
if let StorageCredentials::SASToken(query_pairs) = &self.storage_credentials {
for (k, v) in query_pairs {
request.url_mut().query_pairs_mut().append_pair(k, v);
// TODO: this is a temporary fix so that we don't double add SAS tokens
// This can be removed when all Storage SDKs have been moved to the pipeline architecture
if !request
.url()
.query_pairs()
.any(|(existing, _)| &*existing == k)
{
request.url_mut().query_pairs_mut().append_pair(k, v);
}
}
}

Expand Down