Repository navigation
test: preserve consecutive spaces in multipart filenames - #1770
Merged
He-Pin merged 1 commit intoNov 28, 2026
Merged
Conversation
Motivation: Existing multipart cases cover ordered same-name files and optional filename decoding but not literal consecutive ASCII spaces in filenames. Modification: Round-trip one short modeled multipart part through strict and streamed form data. Assert the quoted filename in strict output and compare the complete decoded part, including the name, content, and filename. Result: Both entity forms protect the existing behavior of preserving both spaces. No production code, API, or network behavior changes. Tests: - JDK 17, Scala 2.13.18 and 3.3.9: 8/8 each across the two MultipartUnmarshallersSpec suite classes, including the new round-trip in each and the adjacent same-name and percent-decoding controls. Exact test source was compiled against source-matching cached runtime classes. The new fixture uses the normal renderer's CRLF in both suites. - Scoped Scalafmt 3.11.5 and git diff --check passed. - Full sbt CI was not run. References: Refs apache#1483 and apache#1497; RFC 7578 Section 4.2.
He-Pin
marked this pull request as ready for review
November 27, 2026 18:35
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.
Motivation
The multipart suite covers a filename with one space, but does not pin preservation of consecutive spaces through both strict and streamed form data.
Modification
Use the existing form-data renderer and unmarshaller with a filename containing two spaces. Assert the literal quoted name in the strict output and compare parsed parts for both strict and streamed entities.
Result
Covers the filename boundary without changing the parser, renderer, or public API.
Tests
git diff --checkpassed. Full sbt build not run.RFC 7578 §4.2.