srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/go.sum
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2026-02-06 09:28:00 +0200
committersrdusr <[email protected]>2026-02-06 09:28:00 +0200
commit157dd0a91badb7eabb3e670b9656f8471dfc9eb6 (patch)
tree3c802d1bd84d74c483b3be62b081f534af35c933 /go.sum
parent8ec54d5ad018828a7e6e40980e9bd9dfaeaa5e7b (diff)
downloadmitmux-157dd0a91badb7eabb3e670b9656f8471dfc9eb6.tar.gz
mitmux-157dd0a91badb7eabb3e670b9656f8471dfc9eb6.zip
Response JSON pretty-printing (display-only)
Another item off the Burp/ZAP/Caido gap list: reading raw JSON responses without any formatting is real daily friction. pretty.go parses raw response bytes via net/http (reusing its tested chunked-transfer-encoding and gzip content-encoding handling rather than reimplementing either) and, if the decoded body is valid JSON, returns it indented. Framing headers that no longer describe the reformatted body (Transfer-Encoding, Content-Encoding, Content-Length) are dropped from the displayed header block since keeping them would be actively misleading. Falls back to raw on anything that doesn't parse cleanly. This is deliberately display-only and off by default: 'p' toggles it in the detail view's response tab, refreshing the viewport in place; the underlying raw bytes (what's stored, what would be resent) are never touched. Not wired into Repeater's response pane or into either tool's editable request buffer - the whole point of this tool is byte- exact control, so nothing that could be sent anywhere gets silently reformatted, only a read-only view a user explicitly asked to reformat. Verified live against a real response with a known formatting quirk: httpbin.org's own JSON output uses Python's json.dumps with ", " separators, leaving a trailing space before each newline (confirmed directly in the stored raw bytes: "7B 7D 2C 20 0A" - "{}, \n"). Toggling pretty mode replaced it with Go's canonical json.Indent output, and toggling back returned the original raw bytes - proving the reformatting is real, not just passing through the origin's own formatting.
Diffstat (limited to 'go.sum')
0 files changed, 0 insertions, 0 deletions