Skip to content
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

Make sure header name Content-MD5 is lower-cased #929

Merged
merged 2 commits into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
28 changes: 25 additions & 3 deletions sdk/storage_blobs/examples/put_block_blob_00.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,31 @@ async fn main() -> azure_core::Result<()> {
.nth(2)
.expect("please specify blob name as command line parameter");

let blob_client = StorageClient::new_access_key(&account, &access_key)
.container_client(&container)
.blob_client(&blob_name);
let container_client =
StorageClient::new_access_key(&account, &access_key).container_client(&container);

//put list of block
{
let foo_blob_client = container_client.blob_client("foo");
bmc-msft marked this conversation as resolved.
Show resolved Hide resolved
let mut block_list = BlockList::default();
block_list
.blocks
.push(BlobBlockType::new_uncommitted("1".as_bytes()));
block_list
.blocks
.push(BlobBlockType::new_uncommitted("2".as_bytes()));
block_list
.blocks
.push(BlobBlockType::new_uncommitted("3".as_bytes()));

let resp = foo_blob_client
.put_block_list(block_list)
.into_future()
.await?;
println!("PutBlockListResponse: {:?}", resp);
}

let blob_client = container_client.blob_client(&blob_name);

let data = Bytes::from_static(b"something");

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage_blobs/src/blob/operations/put_block_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl PutBlockListBuilder {
};

let mut headers = Headers::new();
headers.insert("Content-MD5", &md5);
headers.insert("content-md5", &md5);
evanxg852000 marked this conversation as resolved.
Show resolved Hide resolved
headers.add(self.content_type);
headers.add(self.content_encoding);
headers.add(self.content_language);
Expand Down