-
Notifications
You must be signed in to change notification settings - Fork 598
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
Conversation
|
||
request_Override = function(opts) { | ||
setImmediate(function () { | ||
var expectedRange = 'bytes=0-0'; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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? |
I don't like 0 as default start because that just destroys potentially useful functionality. It's not difficult to specify |
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? |
@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 |
Ah, I get what you're saying. I'll fix it to do what you assumed then we can discuss alternatives after. |
Should be ready for another look. Let me know if the documentation should be clarified or added to any further as well. |
Perfecto! |
Accept 0 for start and end of storage range requests
autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters.
autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters.
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
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.
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
Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1.
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>
🤖 I have created a release \*beep\* \*boop\* --- ### [5.4.1](https://www.github.com/googleapis/nodejs-security-center/compare/v5.4.0...v5.4.1) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#415](https://www.github.com/googleapis/nodejs-security-center/issues/415)) ([aa77ac3](https://www.github.com/googleapis/nodejs-security-center/commit/aa77ac33ed9e20e75505fb4d31183a0f1f0d1f76)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…#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
Fixes #415