Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlobRestProxy.getBlob does not respect GetBlobOptions.setComputeRangeMD5 #80

Closed
jcookems opened this issue May 20, 2012 · 2 comments
Closed

Comments

@jcookems
Copy link
Contributor

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
Copy link

gcheng commented Jul 10, 2012

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

@ghost ghost assigned gcheng Jul 13, 2012
@gcheng
Copy link

gcheng commented Jul 26, 2012

fix ready!

@gcheng gcheng closed this as completed Aug 7, 2012
joostdenijs pushed a commit to joostdenijs/azure-sdk-for-java that referenced this issue Jan 18, 2013
Initial Storage Checkin
joostdenijs pushed a commit to joostdenijs/azure-sdk-for-java that referenced this issue Jan 18, 2013
jianghaolu pushed a commit to jianghaolu/azure-sdk-for-java that referenced this issue Apr 5, 2017
Initial Storage Checkin
g2vinay pushed a commit to g2vinay/azure-sdk-for-java that referenced this issue May 30, 2019
navalev pushed a commit to navalev/azure-sdk-for-java that referenced this issue Dec 24, 2019
Adds passing canMergeDynamicDocuments
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants