Repository navigation
chore: address leftover review nits from recently merged PRs - #1501
Merged
Merged
Conversation
Motivation: Several recently merged PRs left review points unaddressed: docs that were asked to be dropped, comments and tests that were suggested, and small API and internal tidy-ups. Modification: - Add a Scala FilenameEncoding alias and values to Multipart.FormData and use them in the Scala toEntity signature and tests (apache#1494). - Render the form-data Content-Disposition header directly instead of rendering it twice and slicing off the prefix (apache#1494). - Drop the docs paragraph about unpaired URI surrogates (apache#1426) and the cookie -0000 sentence in request-level.md (apache#1493). - Fix the javadsl Multipart.FormData doc the same way apache#1483 fixed the scaladsl one. - Comment the cookie date rule copies so they stay in sync (apache#1458). - Test custom methods starting with Q next to the QUERY fast path (apache#1477). - Use one root package import and a dilated timeout in HeaderCompressionSpec (apache#1438). - Pass isTrailer to HttpMessageRendering.renderHeaders explicitly (apache#1463). - Remove the unused forwarding overloads in Handshake.Client and EnabledPingState (apache#1436, apache#1462). - Move the media type model checks from the routing spec to a new http-core MediaTypesSpec (apache#1437, apache#1454). - Hash the WebSocket key without String.valueOf (apache#1439). Result: The review points are addressed. The only public API change is the added Scala FilenameEncoding alias. Tests: - http-core/testOnly MultipartSpec MultipartsSpec MediaTypesSpec RequestParserCRLFSpec RequestParserLFSpec HeaderCompressionSpec WebSocketClientSpec HeaderSpec HttpHeaderSpec: 314 passed - http2-tests/testOnly HttpMessageRenderingSpec Http2PingSchedulingSpec: 38 passed - http-tests/testOnly FileAndResourceDirectivesSpec: 63 passed - http-core/mimaReportBinaryIssues: passed References: Refs apache#1426, apache#1436, apache#1437, apache#1438, apache#1439, apache#1454, apache#1458, apache#1462, apache#1463, apache#1477, apache#1483, apache#1493, apache#1494
nvollmar
approved these changes
Nov 19, 2026
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:
Several recently merged PRs left review points unaddressed. This PR collects them in one place. Each change below links to the review comment that asked for it.
Modification:
FilenameEncodingalias (#1494 review, first nit):Multipart.FormData.FilenameEncodingis now a Scala alias for the Java enum, withExtended,AsciiandPercentEncodedvalues. The ScalatoEntity(boundary, encoding)signature uses it (same erasure), and the tests take the values from the public API instead of the internalBodyPartRenderer.Content-Dispositiondirectly (#1494 review, second nit):BodyPartRendererused to build the header by rendering it twice and slicing off the prefix. It now renders the header in one pass. The output is unchanged; the existingMultipartSpecbyte-level tests cover it.-0000docs sentence (#1493 review, first nit): it was out of place in "Collecting headers".Multipart.FormDatadoc: it still said "All parts must have distinct names. (This is not verified!)" and cited RFC 2388. #1483 fixed only the scaladsl doc; RFC 7578 §4.3 allows several parts with the same name.IMF-fixdate/asctime-dateto theircookie-*copies. They had already drifted, since fix: accept zero-offset Cookie Expires dates #1493 added-0000only to the cookie versions.Q(#1477 review): customQUOTEandQUERYXmethods still reach the custom method lookup next to the QUERY fast path.HeaderCompressionSpecimports and timeout (#1438 review): oneimport org.apache.pekkoroot import, and3.seconds.dilated.isTrailer(#1463 review):HttpMessageRendering.renderHeaderstakesisTrailerinstead of inferring it from!shouldRenderAutoHeaders.Handshake.Client.validateResponsehad no callers, andEnabledPingState's secondary constructor is replaced by a default for the clock. Both are internal, andhttp-core/mimaReportBinaryIssuespasses without excludes.ContentType.parseandforExtensionchecks for wasm, avif and zstd move fromFileAndResourceDirectivesSpecto a newMediaTypesSpec. The routing spec keeps its resolver cases.key.key.asciiBytesinstead ofString.valueOf(key.key).asciiBytes. A parsed or generated key is never null.Result:
The review points are addressed. The only public API change is the added Scala
FilenameEncodingalias and values. Everything else is internal, tests or docs.Tests:
http-core/testOnly MultipartSpec MultipartsSpec MediaTypesSpec RequestParserCRLFSpec RequestParserLFSpec HeaderCompressionSpec WebSocketClientSpec HeaderSpec HttpHeaderSpec: 314 passedhttp2-tests/testOnly HttpMessageRenderingSpec Http2PingSchedulingSpec: 38 passedhttp-tests/testOnly FileAndResourceDirectivesSpec: 63 passedhttp-core/mimaReportBinaryIssues: passedReferences:
Refs #1426, #1436, #1437, #1438, #1439, #1454, #1458, #1462, #1463, #1477, #1483, #1493, #1494
🤖 Generated with Claude Code