Repository navigation
Fix CLI Buffer handling in variable interpolation - #6922
Merged
bijin-bruno merged 1 commit intoJan 29, 2026
Merged
bijin-bruno merged 1 commit into
bijin-bruno merged 1 commit into
Conversation
…g., gzip-compressed bodies).
so-iwamoto
requested review from
bijin-bruno,
helloanoop,
lohit-bruno and
naman-bruno
as code owners
January 26, 2026 01:43
Contributor
WalkthroughThe change adds a Buffer check in the interpolateVars function to skip JSON interpolation when request.data is a Buffer. This prevents unintended interpolation of binary data like gzip-compressed content while maintaining existing behavior for objects and strings. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bijin-bruno
approved these changes
Jan 29, 2026
This was referenced Feb 5, 2026
3 of 5 tasks
2 of 5 tasks
5 of 6 tasks
2 of 5 tasks
This was referenced May 15, 2026
4 of 6 tasks
2 of 5 tasks
maxenceleblanc
pushed a commit
to maxenceleblanc/curly_cats2
that referenced
this pull request
Jul 20, 2026
…g., gzip-compressed bodies). (usebruno#6922) Co-authored-by: Sora Iwamoto <[email protected]>
2 tasks done
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.
Description
This PR fixes a bug where gzip-compressed request bodies fail in Bruno CLI while working correctly in Bruno GUI (Developer Mode).
Problem
In
packages/bruno-cli/src/runner/interpolate-vars.js, whenContent-Typeincludesjson, Buffer data is incorrectly processed byJSON.stringify()becausetypeof Buffer === 'object'. This destroys the binary data (e.g., gzip-compressed bodies).Solution
Add
!Buffer.isBuffer(request.data)check to skip interpolation for Buffer data.Why this fix works
The GUI (Developer Mode) version (
packages/bruno-electron/src/ipc/network/interpolate-vars.js, line 111) already has this fix. This PR aligns CLI behavior with GUI.Github Issue: 6921
Contribution Checklist:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.