GeezerVison is showing github.com — HttpContent is encoded two times when posting data · Issue #648 · googleapis/google-http-java-client
HttpContent is encoded two times when posting data #648
Labels
🚨This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. Description
The resulting request is correctly encoded once, but we are encoding an extra time when we calculate the content length.
Activity
added
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. on May 24, 2019sduskis commented on May 29, 2019
This is a duplicate of #283.
chingor13 commented on Jun 3, 2019
ContributorAuthor
More actions
It turns out this is non-trivial to fix. The issue is that for some transport adapters, we have to set the Content-Length header before we start streaming the content. This means that we must count the bytes before we send them. We don't want to cache the encoded content in memory as it defeats the purpose of streaming the content and could cause memory spikes in the application. We don't want to write to a temporary file as there may be file system issues/restrictions (like on GAE) that we cannot necessarily plan for.
added
🚨This issue needs some love. and removed
🚨This issue needs some love. on Jun 8, 2019codyoss commented on Oct 15, 2019
@chingor13 do we have more details on this one? Such as what is being affected? Or is there a finite list of Transport Adapters that need the Content-Length set?
codyoss commented on Dec 9, 2019
I will take a stab at this.
added a commit that references this issue
on Dec 10, 2019This issue will close once commit 74556be is merged into the 'master' branch.74556be added a commit that references this issue
on Dec 17, 2019This issue will close once commit b8d6abe is merged into the 'main' branch.b8d6abe
Metadata
Metadata
🚨This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. Development
No branches or pull requestsIssue actions