-
Notifications
You must be signed in to change notification settings - Fork 453
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
feat: support chunked transfer encoding #910
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Sure thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
That should be better, only formatted the files I changed. Sorry about that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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
…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 <39062083+lsirac@users.noreply.github.com>
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