diff options
author | Alex Auvolat <alex@adnab.me> | 2021-01-16 16:05:54 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-01-16 16:05:54 +0100 |
commit | 36814be447a9cdc4a1e6d39a9fe16ad335ab750a (patch) | |
tree | 5bdedc7b2ed0c5add2c14d7e9a1fbcfe30a3c0d3 /src/api/s3_list.rs | |
parent | 6a5add33860349e2866de0e7ddae11375af825a2 (diff) | |
download | garage-36814be447a9cdc4a1e6d39a9fe16ad335ab750a.tar.gz garage-36814be447a9cdc4a1e6d39a9fe16ad335ab750a.zip |
Fix S3 ListObjects result and replace println!s by debug!s0.1.1b
Diffstat (limited to 'src/api/s3_list.rs')
-rw-r--r-- | src/api/s3_list.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/s3_list.rs b/src/api/s3_list.rs index 599d0d11..07b87d3a 100644 --- a/src/api/s3_list.rs +++ b/src/api/s3_list.rs @@ -150,8 +150,8 @@ pub async fn handle_list( writeln!(&mut xml, "\t</Contents>").unwrap(); } if result_common_prefixes.len() > 0 { - writeln!(&mut xml, "\t<CommonPrefixes>").unwrap(); for pfx in result_common_prefixes.iter() { + writeln!(&mut xml, "\t<CommonPrefixes>").unwrap(); writeln!( &mut xml, "\t\t<Prefix>{}</Prefix>", @@ -159,11 +159,11 @@ pub async fn handle_list( //xml_encode_key(pfx, urlencode_resp) ) .unwrap(); + writeln!(&mut xml, "\t</CommonPrefixes>").unwrap(); } - writeln!(&mut xml, "\t</CommonPrefixes>").unwrap(); } writeln!(&mut xml, "</ListBucketResult>").unwrap(); - println!("{}", xml); + debug!("{}", xml); Ok(Response::new(Body::from(xml.into_bytes()))) } |