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

Accept 0 for start and end of storage range requests #416

Merged
merged 1 commit into from
Mar 3, 2015
Merged

Accept 0 for start and end of storage range requests #416

merged 1 commit into from
Mar 3, 2015

Conversation

ryanseys
Copy link
Contributor

Fixes #415

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 28, 2015

request_Override = function(opts) {
setImmediate(function () {
var expectedRange = 'bytes=0-0';

This comment was marked as spam.

@stephenplusplus
Copy link
Contributor

Looks good, but API wise, I would like to see 0 as default. This would block a user from receiving the tail bytes, but an api where you use "end" to specify that doesn't make sense (to me). Any thoughts?

@ryanseys
Copy link
Contributor Author

I don't like 0 as default start because that just destroys potentially useful functionality. It's not difficult to specify start: 0 in my opinion.

@stephenplusplus
Copy link
Contributor

The way the json API expects a range is "start-end" or "number", where "-200" having a dash is just a coincidence. It's not really the "end". I too would like to continue offering this funtionality, but not accidentally as we are currently. Maybe we should just accept a single string/number range (-200 or "3-10", for example) and remove the start/end niceties?

@ryanseys
Copy link
Contributor Author

@stephenplusplus Added documentation to describe the situation where a start is not specified. I can change the default start to zero, I don't feel too strongly either way, but I guess I just like to stick close to the specification in that regard. I'd assume if someone wants the first 100 bytes they would just say 'start: 0, end: 99' especially considering we give that example anyway in the docs.

@ryanseys
Copy link
Contributor Author

Ah, I get what you're saying. I'll fix it to do what you assumed then we can discuss alternatives after.

@ryanseys
Copy link
Contributor Author

Should be ready for another look. Let me know if the documentation should be clarified or added to any further as well.

@stephenplusplus
Copy link
Contributor

Perfecto!

stephenplusplus added a commit that referenced this pull request Mar 3, 2015
Accept 0 for start and end of storage range requests
@stephenplusplus stephenplusplus merged commit 1a7737b into googleapis:master Mar 3, 2015
@ryanseys ryanseys deleted the fix-storage-range branch March 18, 2015 17:24
sofisl pushed a commit that referenced this pull request Oct 12, 2022
autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.
sofisl pushed a commit that referenced this pull request Oct 13, 2022
autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.
sofisl pushed a commit that referenced this pull request Nov 10, 2022
sofisl pushed a commit that referenced this pull request Nov 10, 2022
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/e6ac0f7f-2fc1-4ac2-9eb5-23ba1215b6a2/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@dc9caca
sofisl pushed a commit that referenced this pull request Nov 11, 2022
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/b205fd33-200c-4298-88b8-18b0d1c79a3e/targets

- [ ] To automatically regenerate this PR, check this box.
sofisl pushed a commit that referenced this pull request Nov 11, 2022
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/462962a3-9240-4e8b-ac6c-093ca469e60b/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 361273630
Source-Link: googleapis/googleapis@5477122
sofisl pushed a commit that referenced this pull request Nov 11, 2022
sofisl pushed a commit that referenced this pull request Nov 11, 2022
sofisl pushed a commit that referenced this pull request Nov 11, 2022
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 11, 2022
sofisl pushed a commit that referenced this pull request Nov 17, 2022
sofisl pushed a commit that referenced this pull request Sep 14, 2023
…#416)

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/7b446397-88f3-4463-9e7d-d2ce7069989d/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@5936421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Found a bug in file.js gcloud storage
3 participants