Azure-sdk-for-net: [BUG] BlobClient Uri now returns url encoding paths

Created on 3 Sep 2020  Â·  3Comments  Â·  Source: Azure/azure-sdk-for-net

Hi, in the old version of Azure.Storage.Blobs (12.4.4 and down), the BlobClient.Uri returns a uri without the path encoded, but the new versions (12.5.1 and up), returns uri with path as encoded characters.

Example: below is the old versions 12.4.4
image

And below here is new version 12.5.1
image

I can download the "foo.txt" file whether i download it from "/devstoreaccount1/scratch/hello/foo.txt" or "/devstoreaccount1/scratch/hello%2Ffoo.txt"

But the problem right now is the name of the file will be different.

I'm using a third-party service, that will for example download a file from my blobstorage, and save the file in their own system as "foo.txt", but if i use the new version, the third-party service will name the file "hello2Ffoo.txt" which is not what i wanted.

This means the fix to my problem is that i either have to manually replace all "%2F" to "/" or use the old 12.4.4 version.

In my example, i'm using Storage with localhost emulator, but the same thing happens if i used Storage on Azure.

I dont see anywhere in the release notes that made this change.
https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md

So was this intended or is it a bug?

Client Service Attention Storage customer-reported needs-team-attention question

All 3 comments

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

Thank you for your feedback. Tagging and routing to the team best able to assist.

This is by design, we got a lot of complaints about the previous behavior. The storage service considers encoded and unencoded paths to be the same.

Was this page helpful?
0 / 5 - 0 ratings