Repository navigation
test: tidy up recent media type registrations - #1526
Merged
Merged
Conversation
Motivation: The text/javascript, application/manifest+json and audio/aac changes (apache#1522, apache#1523, apache#1524) put their registry tests in HeaderSpec rather than MediaTypesSpec, mixed in unrelated control assertions, and scattered their docs notes through the "Registering Custom Media Types" section. Modification: Move the registry tests to MediaTypesSpec, dropping the unrelated css/unknown-extension/mp3 assertions. Collect the default extension mappings in a "File Extension Mappings" docs section. Align the text/javascript val and drop stray blank lines around TEXT_JAVASCRIPT. Result: Media type tests and docs live in one place each. No behaviour change. Tests: - sbt "http-core / testOnly ...MediaTypesSpec ...HeaderSpec ...HttpMessageTest": 50 passed References: Refs apache#1522, apache#1523, apache#1524
He-Pin
approved these changes
Nov 21, 2026
pjfanning
added a commit
that referenced
this pull request
Nov 21, 2026
The javadoc-commented TEXT_JAVASCRIPT constant needs blank lines around it, which fails javafmtCheck on main since #1526.
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
#1522 (
text/javascript), #1523 (application/manifest+json) and #1524 (audio/aac) put their registry tests inHeaderSpecinstead of the existingMediaTypesSpec, mixed in control assertions unrelated to the type being added (css,unknown-extension,mp3), and added three separate docs paragraphs at different points in the "Registering Custom Media Types" section, which is about custom types.Modification
HeaderSpectoMediaTypesSpec, keeping all the relevant assertions (including the.json/.manifestno-clash checks) and dropping the unrelated controls. Drop theaudio/mpegcontrol from the Java AAC test.text/javascriptval with its neighbours and drop the stray blank lines aroundTEXT_JAVASCRIPTin the Java constants.Result
Media type tests and docs each live in one place. No behaviour or API change.
Tests
sbt "http-core / testOnly org.apache.pekko.http.scaladsl.model.MediaTypesSpec org.apache.pekko.http.scaladsl.model.headers.HeaderSpec org.apache.pekko.http.javadsl.model.HttpMessageTest": 50 passedReferences
Refs #1522, #1523, #1524