GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Hashes are no longer returned for partial downloads · Issue #266 · googleapis/python-storage

This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Hashes are no longer returned for partial downloads #266

Copy link
Copy link
Closed
#267
Closed
Hashes are no longer returned for partial downloads#266
#267
Copy link
Assignees
andrewsg
Labels
api: storageIssues related to the googleapis/python-storage API.needs more infoThis issue needs more information from the customer to proceed.priority: p2Moderately-important priority. Fix may not be included in next release.

Description

@MartinKilonzo
MartinKilonzo
opened on Sep 2, 2020
Issue body actions

#204 Changed behavior for hashes for partial downloads.
When a partial request is made, we do not return the 'X-Goog-Hash' headers. As a result,
blob.py:812 overwrites the blob.crc32c value with its default, None.
blob.py:813 overwrites the blob.md5_hash value with its default, None.

Environment details

  • OS type and version: Linux 4.19.0-10-cloud-amd64 chore: add split repo templates #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64
  • Python version: python --version: 3.7.3, 3.8.2
  • pip version: pip --version 18.1
  • google-cloud-storage version: pip show google-cloud-storage 1.30+

Steps to reproduce

  1. Get blob
  2. issue a partial download (ie blob.download_to_filename(start=0)
  3. Notice blob.md5_hash and blob.crc32c are None.

Code example

client = storage.Client()
bucket = client.get_bucket(BUCKET_ID)
blob = bucket.get_blob(FILE_NAME)
print('blob.md5_hash: {:}'.format(blob.md5_hash)) # blob.md5_hash: 3qgj3i0eVt8mnNjtSErqZQ==
print('blob.crc32c: {:}'.format(blob.crc32c)) # blob.crc32c: AeFI7Q==

# MD5
blob.download_to_filename(FILE_NAME)
print('blob.md5_hash: {:}'.format(blob.md5_hash)) # blob.md5_hash: 3qgj3i0eVt8mnNjtSErqZQ==
blob.download_to_filename(FILE_NAME, start=0)
print('blob.md5_hash: {:}'.format(blob.md5_hash)) # blob.md5_hash: None

# CRC32C
blob.download_to_filename(FILE_NAME)
print('blob.crc32c: {:}'.format(blob.crc32c)) # blob.crc32c: AeFI7Q==
blob.download_to_filename(FILE_NAME, start=0)
print('blob.crc32c: {:}'.format(blob.crc32c)) # blob.crc32c: None

Activity

  1. product-auto-label
    added
    api: storageIssues related to the googleapis/python-storage API.
    on Sep 2, 2020
  2. MartinKilonzo commented on Sep 2, 2020

    @MartinKilonzo
    MartinKilonzo
    on Sep 2, 2020
    ContributorAuthor
    More actions

    One option is to return the existing complete object hashes already stored when the blob is created: #267

  3. yoshi-automation
    added
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Sep 3, 2020
  4. frankyn
    added
    needs more infoThis issue needs more information from the customer to proceed.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    triage meI really want to be triaged.
    on Sep 11, 2020
  5. frankyn
    assigned
    andrewsg
    on Sep 11, 2020
  6. yoshi-automation
    removed
    🚨This issue needs some love.
    on Sep 11, 2020
  7. andrewsg commented on Sep 14, 2020

    @andrewsg
    andrewsg
    on Sep 14, 2020
    Contributor
    More actions

    Thanks for this detailed report!

  8. tseaver
    closed this as completedin #267on Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @andrewsg
    andrewsg

Labels

api: storageIssues related to the googleapis/python-storage API.needs more infoThis issue needs more information from the customer to proceed.priority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.