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. |
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. |
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. |
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.
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