I am able to upload blobs containing cyrillic characters using Azure.Storage.Blobs 12.9.1
but then am unable to batch delete them using Azure.Storage.Blobs.Batch 12.6.0
.
Consider the following blob name: здраве-и-красота-от-природатаjpg--xfgqfvhj.axp.webp and code:
var blobsToBeDeleted = new List<Uri>();
blobsToBeDeleted.Add(new Uri("azure-storage-address/container/здраве-и-красота-от-природатаjpg--xfgqfvhj.axp.webp"));
blobsToBeDeleted.Add(new Uri("azure-storage-address/container/thumbs/здраве-и-красота-от-природатаjpg--xfgqfvhj.axp.webp"));
await batchClient.DeleteBlobsAsync(blobsToBeDeleted);
After running this against Azure the response is:
Azure.RequestFailedException
{"Invalid response\r\nStatus: 202 (Accepted)\r\n\r\nHeaders:\r\nTransfer-Encoding: chunked\r\nServer: Windows-Azure-Blob/1.0,Microsoft-HTTPAPI/2.0\r\nx-ms-request-id: 9255671d-301e-008e-1a4a-797e59000000\r\nx-ms-version: 2020-08-04\r\nx-ms-client-request-id: ad39b21f-aad7-484e-8121-a707a318088e\r\nDate: Thu, 15 Jul 2021 07:24:29 GMT\r\nContent-Type: multipart/mixed; boundary=batchresponse_7c0d302a-8ee6-4d48-aac1-d973904338c3\r\n"} Azure.RequestFailedException
{"Expected 2 responses for the batch request, not 1."}
Status 202
Other files having the name structure and using the same code as above, but containing only latin characters are deleted successfully.
new Uri()
seems to properly escape characters and since the BlobBatchClient.DeleteBlobsAsync
method accepts IEnumerable<Uri>
I really don't understand where is the problem.
Any ideas on this?
EDIT
This is a know issue, already fixed and will be released in the next version - https://github.com/Azure/azure-sdk-for-net/issues/22329