Skip to content

Commit

Permalink
fix: Azdls returns 403 while continuation contains =
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Jan 31, 2024
1 parent 02d4d07 commit 3fb7f99
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
5 changes: 2 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ sha1 = { version = "0.10.6", optional = true }
sha2 = { version = "0.10", optional = true }

# For http based services.
reqsign = { version = "0.14.6", default-features = false, optional = true }
reqsign = { version = "0.14.7", default-features = false, optional = true }

# for services-atomic-server
atomic_lib = { version = "0.34.5", optional = true }
Expand Down
5 changes: 3 additions & 2 deletions core/src/services/azdls/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,11 @@ impl AzdlsCore {
.expect("write into string must succeed");
}
if let Some(limit) = limit {
write!(url, "&maxresults={limit}").expect("write into string must succeed");
write!(url, "&maxResults={limit}").expect("write into string must succeed");
}
if !continuation.is_empty() {
write!(url, "&continuation={continuation}").expect("write into string must succeed");
write!(url, "&continuation={}", percent_encode_path(continuation))
.expect("write into string must succeed");
}

let mut req = Request::get(&url)
Expand Down
4 changes: 2 additions & 2 deletions core/tests/behavior/async_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ pub async fn test_list_rich_dir(op: Operator) -> Result<()> {
op.write(path, "test_list_rich_dir").await?;
}

let mut objects = op.with_limit(10).lister("test_list_rich_dir/").await?;
let mut objects = op.lister_with("test_list_rich_dir/").limit(10).await?;
let mut actual = vec![];
while let Some(o) = objects.try_next().await? {
let path = o.path().to_string();
Expand All @@ -228,8 +228,8 @@ pub async fn test_list_rich_dir(op: Operator) -> Result<()> {

// List concurrently.
let mut objects = op
.with_limit(10)
.lister_with("test_list_rich_dir/")
.limit(10)
.concurrent(5)
.metakey(Metakey::Complete)
.await?;
Expand Down

0 comments on commit 3fb7f99

Please sign in to comment.