Skip to content
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

Merged
merged 6 commits into from Dec 17, 2019

Conversation

codyoss
Copy link
Member

@codyoss codyoss commented Dec 10, 2019

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

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
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 10, 2019
@codyoss
Copy link
Member Author

codyoss commented Dec 10, 2019

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.

@codyoss codyoss marked this pull request as ready for review December 10, 2019 17:52
@codyoss codyoss requested a review from a team as a code owner December 10, 2019 17:52
@codyoss codyoss requested review from a team and removed request for a team December 10, 2019 17:53
Copy link
Collaborator

@chingor13 chingor13 left a 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?

@codyoss
Copy link
Member Author

codyoss commented Dec 10, 2019

Sure thing.

Copy link
Contributor

@elharo elharo left a 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.

@codyoss
Copy link
Member Author

codyoss commented Dec 10, 2019

That should be better, only formatted the files I changed. Sorry about that.

Copy link
Contributor

@elharo elharo left a 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.

@codyoss codyoss merged commit b8d6abe into googleapis:master Dec 17, 2019
@codyoss codyoss deleted the transfer-encoding branch December 17, 2019 17:20
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 <39062083+lsirac@users.noreply.github.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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpContent is encoded two times when posting data
4 participants