fix: honor backpressure in decompression interceptor - #5829
Merged
Merged
Conversation
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5829 +/- ##
==========================================
- Coverage 93.50% 93.48% -0.03%
==========================================
Files 110 110
Lines 39557 39755 +198
==========================================
+ Hits 36987 37163 +176
- Misses 2570 2592 +22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
metcoder95
approved these changes
Sep 15, 2026
Contributor
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-v7.x v7.x
# Navigate to the new working tree
cd .worktrees/backport-v7.x
# Create a new branch
git switch --create backport-5829-to-v7.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 19901d8b73cb46a48e817dab4afce790f37fd2c1
# Push it to GitHub
git push --set-upstream origin backport-5829-to-v7.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-v7.xThen, create a pull request where the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I made a mess of the original GHSA fix by treating a stream backpressure bug as a response-size policy decision.
A 64 MiB limit answers a different question: how large a decoded response an application is willing to accept. It also rejects legitimate responses that can be consumed safely as streams. The correct fix is to honor the stream contract: stop pulling decoded output when the consumer pauses, propagate writable pressure from the decoder back to the transport, keep those pause reasons independent across retries, and wait to signal completion until the consumer resumes.
maxSizestill exists as an opt-in per-stage circuit breaker. It now defaults to0, leaving size policy to applications while backpressure keeps buffering tied to consumer demand.