Cannot copy blob from implicit root container #86

Closed
jcookems opened this Issue May 22, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@jcookems
Contributor

jcookems commented May 22, 2012

Most of the blob APIs allow the the user to pass the empty string as the container name to indicate the implicit root container (as opposed to being explicit, using "$root").

However, that does not work for the source container's name when using the copyBlob API. Looking at the headers sent out, the problems is that the source is malformed with a double slash in the middle:

X-Ms-Copy-Source: /XXX//qa-214273-int-39

The problem in in BlobRestProxy.getCopyBlobSourceName, where source container is checked for null, but not empty. The fix is to change:

-    if (sourceContainer != null) {
+    if (sourceContainer != null && !sourceContainer.isEmpty()) {
@gcheng

This comment has been minimized.

Show comment Hide comment
@gcheng

gcheng Jul 10, 2012

We should have unit test for scenario like this.

gcheng commented Jul 10, 2012

We should have unit test for scenario like this.

joostdenijs pushed a commit to joostdenijs/azure-sdk-for-java that referenced this issue Jan 18, 2013

Merge pull request #86 from rpaquay/dev
A couple of bug fixes

joostdenijs pushed a commit to joostdenijs/azure-sdk-for-java that referenced this issue Jan 18, 2013

Albert Cheng
Merge pull request #86 from gcheng/nowarnings
no Eclipse warnings for new code.
@gcheng

This comment has been minimized.

Show comment Hide comment
@gcheng

gcheng Jun 24, 2014

no longer in scope

gcheng commented Jun 24, 2014

no longer in scope

@gcheng gcheng closed this Jun 24, 2014

jianghaolu pushed a commit to jianghaolu/azure-sdk-for-java that referenced this issue Apr 5, 2017

Merge pull request #86 from rpaquay/dev
A couple of bug fixes

jianghaolu pushed a commit to jianghaolu/azure-sdk-for-java that referenced this issue Apr 5, 2017

Albert Cheng
Merge pull request #86 from gcheng/nowarnings
no Eclipse warnings for new code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment