Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: don't set content-range on empty uploads #1070

Merged
merged 2 commits into from
Oct 20, 2020

Conversation

busunkim96
Copy link
Contributor

@busunkim96 busunkim96 commented Oct 20, 2020

Fixes #638 🦕

Setting the content-range header on an empty resumable upload results in 400 Invalid Argument. Only set the content-range if there is content. This is what the Java discovery client does (code).

TODO:

  • add unit test case

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 20, 2020
@busunkim96 busunkim96 marked this pull request as ready for review October 20, 2020 15:15
@busunkim96 busunkim96 requested a review from a team as a code owner October 20, 2020 15:15
@busunkim96 busunkim96 merged commit af6035f into googleapis:master Oct 20, 2020
efiop added a commit to iterative/PyDrive2 that referenced this pull request Oct 22, 2020
# for free to join this conversation on GitHub. Already have an account? # 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.

HttpError 400 on uploading 0 bytes files, 416 on downloading 0 bytes files
2 participants