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

StorageClient.DownloadObject fails for compressed data with a client configured not to decompress #1784

Closed
jskeet opened this issue Dec 14, 2017 · 1 comment
Assignees
Labels
api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. status: blocked Resolving the issue is dependent on other work. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jskeet
Copy link
Collaborator

jskeet commented Dec 14, 2017

This is a special case of #1641, and more of a corner case.

If the client has been explicitly configured to disable decompression support, but tries to download an object which has Content-Encoding: gzip, the server will provide the hash of the compressed data, but will serve the decompressed data. There's no way of validating the hash provided.

There are two options here:

  • The server could stop providing the hash, meaning the client library will just download without validating
  • The library could detect this scenario and skip validation

The latter option depends on a reliable way of detecting this scenario - the header being provided at the moment is not deemed sufficiently stable/reliable that we want to take a dependency on it. This issue is therefore blocked on a server-side change one way or the other.

@jskeet jskeet self-assigned this Dec 14, 2017
@jskeet jskeet added api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. status: blocked Resolving the issue is dependent on other work. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 14, 2017
jskeet added a commit to jskeet/google-cloud-dotnet that referenced this issue Dec 15, 2017
This fixes googleapis#1641, but I've opened googleapis#1784 for a more corner-case-like
version of the same problem.
jskeet added a commit to jskeet/google-cloud-dotnet that referenced this issue Dec 15, 2017
This fixes googleapis#1641, but I've opened googleapis#1784 for a more corner-case-like
version of the same problem.
jskeet added a commit that referenced this issue Dec 15, 2017
This fixes #1641, but I've opened #1784 for a more corner-case-like
version of the same problem.
jskeet added a commit to jskeet/google-cloud-dotnet that referenced this issue Mar 12, 2018
(I'll close this issue for now, after merging.)
jskeet added a commit that referenced this issue Mar 12, 2018
(I'll close this issue for now, after merging.)
@jskeet
Copy link
Collaborator Author

jskeet commented Mar 12, 2018

Added to the backlog as server changes would be needed (and aren't imminent); closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. status: blocked Resolving the issue is dependent on other work. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant