Repository navigation
Conversation
Retain multipart value bytes before text decoding and pass them through new defaulted form callbacks. Forward the bytes through derived forms and built-in wrappers so TempFile and byte-slice guards preserve uploads. Keep existing text decoding, field classification, and limits. Fixes rwf2#2934.
pederbe
marked this pull request as ready for review
September 25, 2026 15:44
Member
|
This is way over-scoped. The fix for the issue is way simpler. This is also clearly AI without little regard for human oversight. |
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.
Multipart parts without a Content-Type currently pass through text decoding before reaching TempFile or byte-slice form guards. This replaces invalid UTF-8 and can strip or transcode byte-order marks, changing uploaded files even when a filename is supplied.
Retain the original part bytes and add defaulted raw-value callbacks to FromForm and FromFormField. Derived forms and built-in wrappers forward those bytes to binary guards, while existing text guards keep their decoding and value/data dispatch behavior. Headerless parts retain their existing buffered storage and data-form limit; explicit Content-Type parts keep streaming through the data-field path.
Custom form wrappers that forward value fields must also forward push_value_with_bytes to preserve binary contents in their inner guards. Transformed text retains both the original bytes and the decoded text. Regression coverage includes every byte value, both filename variants, byte-order marks, nested forms, legacy callbacks, limits, and cleanup.
With the dependency versions resolved locally, the full workspace build encounters a database dependency conflict that also reproduces on the unchanged base. Core tests and the examples suite pass.
Fixes #2934.