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 — Found a bug in file.js gcloud storage · Issue #415 · googleapis/google-cloud-node

Found a bug in file.js gcloud storage #415

New issue
Copy link
New issue
Copy link
Closed
#416
Closed
Found a bug in file.js gcloud storage#415
#416
Copy link
Assignees
stephenplusplus
Labels
🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@Marc477
Marc477
opened on Feb 27, 2015
Issue body actions

I found a bug in file.js at line 318

Range: 'bytes=' + [options.start || '', options.end || ''].join('-')

If I I use a read stream with start and end, it wont work if start = 0
aFile.createReadStream({start: 0, end: 123}).pipe(res);

Here the header Range will be set to "bytes:-123" but google storage will return nothing, the header should be set to "bytes:0-123" to get valid data from gcloud storage.

Make sure you set nothing in the header Range only if options.start is UNDEFINED but not if it is equal to 0

Activity

Next
  1. ryanseys
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: storageIssues related to the Cloud Storage API.
    pr sent
    on Feb 27, 2015
  2. stephenplusplus commented on Feb 28, 2015

    @stephenplusplus
    stephenplusplus
    on Feb 28, 2015
    Contributor
    More actions

    Yeah, looks like that gets the last x bytes, where I thought 0 was implied. We can just fix the bug and call it done, though I would rather default to 0 if not specified. We would shut out the ability for a user to read the tail bytes, but maybe we can come up with another way to do that.

  3. ryanseys commented on Feb 28, 2015

    @ryanseys
    ryanseys
    on Feb 28, 2015
    Contributor
    More actions

    I think it's understandable once you get past that initial assumption. Range requests are a little out of the ordinary anyway, so giving the users flexibility here is probably better and worth the couple extra sentences of documentation to describe the different cases. No reason to overcomplicate with "another way" when this way works just fine with a sprinkle of documentation. :)

  4. ryanseys commented on Mar 1, 2015

    @ryanseys
    ryanseys
    on Mar 1, 2015
    Contributor
    More actions

    I've changed my mind on this considering the terminology we are using start and end. I've updated the PR to reflect this. You'll no longer be able to "tail" the objects contents using just the end value. We'll have to find a way to support this functionality in the future.

  5. stephenplusplus
    closed this as completedin #416on Mar 3, 2015
  6. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 6, 2020
  7. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  8. sofisl
    added a commit that references this issue on Oct 12, 2022

    chore: add api_shortname and library_type to repo metadata (#415)

    aa2c5cd
  9. sofisl
    added 4 commits that reference this issue on Nov 10, 2022

    chore(deps): update dependency eslint-plugin-node to v11 (#415)

    c5d0b7e

    fix: update node issue template (#415)

    31a0855

    fix: synth.py clean up for multiple version (#415)

    d7ed3f8

    chore(node): fix kokoro build path for cloud-rad (#415)

    1523090
  10. 15 remaining items

  11. miguelvelezsa
    added 2 commits that reference this issue on Jan 14, 2026

    build(tests): fix coveralls and enable build cop (#415)

    07c84d7

    build(tests): fix coveralls and enable build cop (#415)

    982adc4
  12. sofisl
    added 5 commits that reference this issue on Jan 27, 2026

    fix: mark release sub-jobs as part of release (#415)

    1e70522

    fix: mark release sub-jobs as part of release (#415)

    2b7e4a1

    fix: mark release sub-jobs as part of release (#415)

    52dcfcb

    refactor(docs): add new sample links to README.md and samples/README.…

    1a56490

    build(tests): fix coveralls and enable build cop (#415)

    d64013f
  13. GautamSharda
    added a commit that references this issue on Feb 25, 2026

    feat: update libs to support TPC Universes (#415)

    3a8d327
  14. GautamSharda
    added a commit that references this issue on Mar 5, 2026

    build: Add docuploader credentials to node publish jobs (#415)

    d79e7e8
  15. sofisl
    added a commit that references this issue on Mar 5, 2026

    chore: migrate code from googleapis/gcp-metadata (#53)

    fa9a454
  16. GautamSharda
    added a commit that references this issue on Mar 12, 2026

    fix(deps): update dependency @google-cloud/promisify to v1 (#415)

    71d24c2
  17. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    build: test using @grpc/grpc-js in CI (#415)

    658ce5d

    build: test using @grpc/grpc-js in CI (#415)

    d7532fd
  18. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    build: test using @grpc/grpc-js in CI (#415)

    a8d4384
  19. thiyaguk09
    added a commit that references this issue on May 5, 2026

    build: test using @grpc/grpc-js in CI (googleapis#415)

    3a66d10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

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.