Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Source access conditions not honored by BlobRestProxy.copyBlob #85

jcookems opened this Issue · 2 comments

2 participants


Regardless of what source access conditions are provided in the options of CopyBlob, the calls succeed. This is because of an issue in PipelineHelpers.addOptionalSourceAccessContitionHeader, reproduced here:

            switch (accessCondition.getHeader()) {
                case IF_MATCH:
                    headerName = "x-ms-source-if-match";
                case IF_UNMODIFIED_SINCE:
                    headerName = "x-ms-source-if-unmodified-since";
                case IF_MODIFIED_SINCE:
                    headerName = "x-ms-source-if-modified-since";
                case IF_NONE_MATCH:
                    headerName = "x-ms-source-if-none-match";
                    headerName = "";

The problem is that in Java, one case cascades into the next, so regardless of the value of the Header property, the headerName is always the empty string.

The fix is to add a break; statement at the end of each case block.


Pending code review #104

@gcheng gcheng was assigned

gosh, the whole namespace doesn't have unit test!

@gcheng gcheng closed this
@gcheng gcheng was unassigned by jcookems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.