Render multipart/form-data bodies as a parsed JSON view#36
Merged
Conversation
File uploads and multi-field forms were previously shown as raw,
boundary-delimited text, making them hard to inspect at a glance.
Parse them client-side into an ordered array of parts instead —
{name, value} for fields, {name, filename, contentType, size} for
files (content itself is never shown). Falls back to the existing
raw display for anything that doesn't parse as well-formed multipart.
Split renderBody/htmlEscape out of index.js into render-body.js
alongside the new parsing logic, since that's the piece actually
growing.
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.
Summary
renderBodynow parsesmultipart/form-databodies into an ordered array of parts ({name, value}for fields,{name, filename, contentType, size}for files — file content itself is never shown), reusing the existing JSON highlight path.htmlEscape+renderBodyout ofpublic/index.jsinto a newpublic/render-body.js, since body-rendering is the piece that's actually growing.Test plan
go vet ./...andgo test ./...