-
Notifications
You must be signed in to change notification settings - Fork 229
Validate CRC32c if x-goog-hash
header is present
#2281
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
Comments
Probably we can use package:crclib. |
This is actually in: After viewing |
There is also a crc32 implementation here: Thought this isn't the variant used by GCS, but it could probably be tweaked. |
The
x-goog-hash
header is present in responses from GCS, see: https://cloud.google.com/storage/docs/hashes-etagsPlease note that if the object was transcoded by GCS then the has will be invalid.
Also the validate must happen before gzip decompression, if the response is gzipped, and the request must be made with
Accept-Encoding: gzip
.If we get this wrong, we won't be able to gzip data in GCS in the future, let's aim to avoid that.
The text was updated successfully, but these errors were encountered: