Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

BlobRestProxy.getBlob does not respect GetBlobOptions.setComputeRangeMD5 #80

Closed
jcookems opened this Issue · 2 comments

2 participants

@jcookems

There is no difference between calling getBlob with or without setComputeRangeMD5 set. For example:

    options = new GetBlobOptions();
    options.setRangeStart(50L);
    options.setRangeEnd(200L);
    options.setComputeRangeMD5(true);
    service.getBlob(container, blob, options));

Sends the following HTTP message:

GET http://XXX.blob.core.windows.net/qa-476476-a1/qa-476476-int-8 HTTP/1.1
x-ms-version: 2011-08-18
Range: bytes=50-200
Date: Sun, 20 May 2012 00:52:22 GMT
Authorization: XXX
User-Agent: Java/1.6.0_29
Host: XXX.blob.core.windows.net
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

One fix would be to add this clause to the getBlob method:

    if (options.isComputeRangeMD5()) {
        builder = addOptionalHeader(builder, "x-ms-range-get-content-md5", "true");
    }
@gcheng

SDK should respect the parameters that are passed in! We should also strive to add a unit test for this scenario!

@gcheng gcheng was assigned
@gcheng

fix ready!

@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.