feat: support chunked transfer encoding#910
Merged
codyoss merged 6 commits intogoogleapis:masterfrom Dec 17, 2019
Merged
Conversation
Currently any time HttpRequest works with encoded data it encodes the data twice. Once for the actaul stream and once for checking the length of the stream. Instead, when there is encoding just don't set the content length. This will cause the underlying transports, with a few tweaks, to use Transfer-Encoding: chunked. Fixes googleapis#648
Member
Author
|
Sorry for some whitespace churn. I ran the formatter for my commit, and it looks there were a handful of other files that were not complying. |
chingor13
requested changes
Dec 10, 2019
Contributor
chingor13
left a comment
There was a problem hiding this comment.
Can we separate the formatting changes from this PR?
...p-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java
Outdated
Show resolved
Hide resolved
Member
Author
|
Sure thing. |
elharo
reviewed
Dec 10, 2019
Contributor
elharo
left a comment
There was a problem hiding this comment.
The number of formatting changes in this PR make it hard to see the important parts.
...ient-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpRequestTest.java
Show resolved
Hide resolved
Member
Author
|
That should be better, only formatted the files I changed. Sorry about that. |
elharo
reviewed
Dec 10, 2019
Contributor
elharo
left a comment
There was a problem hiding this comment.
It's still easier if reformatting is done in a separate PR, and I'd try to avoid global reformatting in IDEs. Rewrapping paragraphs is not very useful.
elharo
approved these changes
Dec 10, 2019
google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java
Show resolved
Hide resolved
...p-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java
Outdated
Show resolved
Hide resolved
google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java
Outdated
Show resolved
Hide resolved
chingor13
approved these changes
Dec 17, 2019
clundin25
pushed a commit
to clundin25/google-http-java-client
that referenced
this pull request
Aug 11, 2022
…s#910) * feat: Added iam endpoint override to ImpersonatedCredentials * fix: Fixed GoogleCredentialsTests that were broken by regional impersonated credential url change * fix: Addressed code review comments * fix: fixed createScoped method in impersonatedCredentials to use override endpoint correctly and added test * fix: fixed linter errors Co-authored-by: Leo <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently any time HttpRequest works with encoded data it encodes
the data twice. Once for the actual stream and once for checking
the length of the stream. Instead, when there is encoding just don't
set the content length. This will cause the underlying transports,
with a few tweaks, to use Transfer-Encoding: chunked.
Fixes #648