Anonymous - 2011-05-02

Hello,

I noticed a problem with getting uri of a blob which name contains colons. An example scenario is as follows:

IBlobContainer containerRef = bStorageRef.getBlobContainer("tmp");
blobProps = new BlobProperties("a:b");
blobRef = containerRef.createBlockBlob(blobProps, new BlobContents(new byte[0]));
blobProps = blobRef.getProperties();

Now blobProps.getName() returns correct name i.e. "a:b" but blobProps.getUri().toString() returns "http://<my account>.blob.core.windows.net/tmp/a%253Ab"
This looks like the name was escaped twice. First to escape ':' which results in "…/tmp/a%3Ab" and then to escape '%' which results in "…/tmp/a%253Ab"

Is this a bug or am I doing something wrong here?