Description
Bug Report
go.mod has:
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
-
What happened?
Tried to delete a nonexistent blob with a tab in the blob name, only to get:
DELETE https://***.blob.core.windows.net/***/test/8d2c49bac5508e462cfe/1b4065bd5a50da115809 1a72b71e016e13da895d
--------------------------------------------------------------------------------
RESPONSE 400: 400 The requested URI does not represent any resource on the server.
ERROR CODE: InvalidUri
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<Error><Code>InvalidUri</Code><Message>The requested URI does not represent any resource on the server.
RequestId:b1db98f2-001e-0068-16da-bd1294000000
Time:2025-05-05T16:25:02.6234612Z</Message></Error>
--------------------------------------------------------------------------------
type=*exported.ResponseError
-
What did you expect or want to happen?
A 404.
-
How can we reproduce it?
By putting a tab character anywhere in the blob name, path encoded. The above was setup like:
blobURL := containerURL + "/" + prefix + "/" + url.PathEscape(blobName)
client := blockblob.NewClientWithSharedKeyCredential(blobURL, cred, o)
and before the client.Delete()
, the client.URL() looked like:
https://***.blob.core.windows.net/***/test/8d2c49bac5508e462cfe/1b4065bd5a50da115809%091a72b71e016e13da895d
-
Anything we should know about your environment.
This was a test case, but we do have a file in azure that somehow got a tab in the blob name, which we cannot now access.