Skip to content

Fix handling interrupted uploads#572

Merged
sduskis merged 3 commits intogoogleapis:masterfrom
chingor13:interrupted-write
Feb 10, 2019
Merged

Fix handling interrupted uploads#572
sduskis merged 3 commits intogoogleapis:masterfrom
chingor13:interrupted-write

Conversation

@chingor13
Copy link
Copy Markdown
Contributor

@chingor13 chingor13 commented Jan 9, 2019

Fixes #530
cc @dzelemba

It's possible that a server handling a POST/PUT with content will interrupt the write and return a response. If this is the case, we should be able to read the response rather than throwing an IOException.

@chingor13 chingor13 requested a review from a team January 9, 2019 23:24
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 9, 2019
@chingor13 chingor13 changed the title WIP: Fix handling interrupted uploads Fix handling interrupted uploads Jan 9, 2019
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Feb 7, 2019
@sduskis sduskis merged commit 16a0ec5 into googleapis:master Feb 10, 2019
@chingor13
Copy link
Copy Markdown
Contributor Author

This didn't actually fix the issue. The body isn't actually readable if the upload fails as the connection is closed already and any response data is lost. The mock in the added test is not actually what happens.

clundin25 pushed a commit to clundin25/google-http-java-client that referenced this pull request Aug 11, 2022
* feat: add self signed jwt support

* update

* chore: add more tests

* update

* update defaultscopes

* update default scopes

* update

* update ComputeEngineCredentials

* improve test coverage

* update

Co-authored-by: Brent Shaffer <betterbrent@google.com>
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. 🚨 This issue needs some love.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants