question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Capitalization has changed when BlobTraits are serialized into request URI parameters for List Blob requests

See original GitHub issue

Describe the bug I’m a bit unsure whether this should actually be classified as a bug, or whether the behavior is acceptable.

Basically, I’ve noticed that after upgrading from Azure.Storage.Blobs 12.8.4 -> 12.9.1, the URI parameters that are generated when calling BlobContainerClient.GetBlobsAsync() and specifying some traits (such as BlobTraits.Metadata) are capitalized differently than before the upgrade.

Specifically, doing something like:

AsyncPageable<BlobItem> asyncPageable = containerClient.GetBlobsAsync(BlobTraits.Metadata);
IAsyncEnumerator<BlobItem> enumerator = asyncPageable.GetAsyncEnumerator();

and then iterating the enumerator will generate List Blob requests. In version 12.8.4, the request URI would look something like https://<server>/<account>/<container>?restype=container&comp=list&include=metadata, whereas in version 12.9.1 the request URI looks like https://<server>/<account>/<container>?restype=container&comp=list&include=Metadata (notice the capital M in Metadata).

Again, I’m not sure if this is a big deal, but the difference made some of my integration tests fail, because I’m mocking the Azure Storage REST API and did a case-sensitive string comparision (the official api docs does not mention anything about how capitalization is handled, although I suspect that the implementation might be permissive enough to handle this difference?).

I thought I would report it nonetheless, in case this change was not intentional.

Expected behavior GetBlobsAsync(BlobTraits.Metadata) should generate request URIs containing include=metadata as query parameter.

Actual behavior (include Exception or Stack Trace) GetBlobsAsync(BlobTraits.Metadata) generates request URIs containing include=Metadata as query parameter.

Environment:

  • Name and version of the Library package used: Azure.Storage.Blobs 12.9.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
amishra-devcommented, Jun 29, 2021

URLs are supposed to be case-insensitive, can I safely assume that you are not hindered by it but just wanted to let us know?

0reactions
seanmcc-msftcommented, Jul 9, 2021

@egraff, query parameters values are case-insensitive in Azure Storage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG][Storage] Uploading Blob metadata with uppercase ...
Uploading a blob with metadata to the Azure storage service fails when there's at least one uppercase character in one of the metadata...
Read more >
[BUG] Azure.Storage.Blob 12.6.0 changed url encoding ...
Describe the bug Version 12.5.1/12.6.0 is encoding / chars in the filename, so when I pass some/path/file.json to BlobContainerClient.
Read more >
Azure Blob List "Value for one of the query parameters ...
I'm using API Management service to make a simple interface between a c# desktop application and a Azure Blob storage account. API Management ......
Read more >
Put Blob From URL (REST API) - Azure Storage
The Put Blob From URL operation creates a new block blob where the contents of the blob are read from a specified URL....
Read more >
Transform to lowercase incoming URLs in Azure CDN
I created a static website using Azure Blob Storage and Azure CDN services. All files and folders are in lowercase format; however, some ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found