GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: support chunked transfer encoding by codyoss · Pull Request #910 · googleapis/google-http-java-client

Conversation

@codyoss

@codyoss codyoss commented Dec 10, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@codyoss
feat: support chunked transfer encoding
74556be
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

codyoss commented Dec 10, 2019

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codyoss
codyoss marked this pull request as ready for review December 10, 2019 17:52
@codyoss
codyoss requested review from a team and removed request for a team December 10, 2019 17:52
chingor13
chingor13 requested changes Dec 10, 2019
View reviewed changes

@chingor13 chingor13 left a comment

Copy link
Copy Markdown
Contributor

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...p-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@codyoss

codyoss commented Dec 10, 2019

Copy link
Copy Markdown
Member Author

Sure thing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

elharo
elharo reviewed Dec 10, 2019
View reviewed changes

@elharo elharo left a comment

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...ient-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpRequestTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

codyoss added 2 commits December 10, 2019 15:27
@codyoss
revert format changes
286f847
@codyoss
fix pr comments
ad1629f
@codyoss
codyoss requested review from chingor13 and elharo December 10, 2019 22:28
@codyoss

codyoss commented Dec 10, 2019

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

elharo
elharo reviewed Dec 10, 2019
View reviewed changes

@elharo elharo left a comment

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
elharo
elharo approved these changes Dec 10, 2019
View reviewed changes
Comment thread google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...p-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

codyoss added 2 commits December 10, 2019 16:58
@codyoss
fix
fcc043c
@codyoss
refacor test for checkState
8573744
chingor13
chingor13 approved these changes Dec 17, 2019
View reviewed changes
@chingor13
Merge branch 'master' into transfer-encoding
c0645ca
@codyoss
codyoss merged commit b8d6abe into googleapis:master Dec 17, 2019
@codyoss
codyoss deleted the transfer-encoding branch December 17, 2019 17:20
@elharo elharo mentioned this pull request Mar 15, 2020
Performance: JsonHttpContent.writeTo() is called twice for each HttpRequest #283
Closed
clundin25 pushed a commit to clundin25/google-http-java-client that referenced this pull request Aug 11, 2022
@aeitzman @lsirac
feat: Add iam endpoint override to ImpersonatedCredentials (googleapi…
97bfc4c
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chingor13 chingor13 chingor13 approved these changes
+1 more reviewer
@elharo elharo elharo approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

HttpContent is encoded two times when posting data

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@codyoss @chingor13 @elharo @googlebot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.