[BUG] Capitalization has changed when BlobTraits are serialized into request URI parameters for List Blob requests
See original GitHub issueDescribe 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:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
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?
@egraff, query parameters values are case-insensitive in Azure Storage.