Repository navigation
feat: register the AAC audio media type - #1524
Merged
Merged
Conversation
He-Pin
added a commit
to He-Pin/incubator-pekko-http
that referenced
this pull request
Nov 20, 2026
Motivation: The default registry does not recognize the registered audio/aac media type or its .aac and .loas filename extensions. Modification: Register binary, non-compressible audio/aac for .aac and .loas, expose Scala and Java constants, and document and test the default mapping. Use explicit nested iteration in the resolver test so both loop bindings are in scope on Scala 3. Result: ADTS .aac and LATM/LOAS .loas files resolve to audio/aac without a charset parameter. Existing audio mappings are unchanged. Tests: - The prior PR head passed Scala 2.13, Checks, Headers, and Scalafmt in GitHub Actions. Both Scala 3 lanes failed compiling the resolver test with 'Not found: filename'; this revision changes only that test. - Isolated Scala 2.13.18 compilation with -Werror and one extracted ScalaTest resolver case passed (eight filename/charset combinations). - Cached Scalafmt 3.11.5 and git diff --check passed. - Full sbt and Scala 3 were not rerun locally; CI pending for this revision. References: Refs apache#1524. https://www.iana.org/assignments/media-types/audio/aac netty/netty#16036 (independent implementation)
He-Pin
force-pushed
the
feat/aac-media-type
branch
from
November 20, 2026 06:35
663e57b to
230676e
Compare
He-Pin
marked this pull request as ready for review
November 20, 2026 06:56
nvollmar
approved these changes
Nov 20, 2026
Motivation: The default registry does not recognize the registered audio/aac media type or its .aac and .loas filename extensions. Modification: Register binary, non-compressible audio/aac for .aac and .loas, expose Scala and Java constants, and document and test the default mapping. Use explicit nested iteration in the resolver test so both loop bindings are in scope on Scala 3. Result: ADTS .aac and LATM/LOAS .loas files resolve to audio/aac without a charset parameter. Existing audio mappings are unchanged. Tests: - The prior PR head passed Scala 2.13, Checks, Headers, and Scalafmt in GitHub Actions. Both Scala 3 lanes failed compiling the resolver test with 'Not found: filename'; this revision changes only that test. - Isolated Scala 2.13.18 compilation with -Werror and one extracted ScalaTest resolver case passed (eight filename/charset combinations). - Cached Scalafmt 3.11.5 and git diff --check passed. - Full sbt and Scala 3 were not rerun locally; CI pending for this revision. References: Refs apache#1524. https://www.iana.org/assignments/media-types/audio/aac netty/netty#16036 (independent implementation)
He-Pin
force-pushed
the
feat/aac-media-type
branch
from
November 20, 2026 14:34
230676e to
a058d85
Compare
This was referenced Nov 20, 2026
pjfanning
added a commit
that referenced
this pull request
Nov 21, 2026
Motivation: The text/javascript, application/manifest+json and audio/aac changes (#1522, #1523, #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 #1522, #1523, #1524
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 registered audio/aac media type and its .aac and .loas filename mappings
are missing from the built-in registry.
Modification
Add binary, non-compressible Scala and Java constants and the two extension
mappings. Cover registry lookup, parsing, Java use and file resolver behavior.
Document the default mapping while retaining existing audio types.
Result
ADTS .aac and LATM/LOAS .loas files resolve to audio/aac without a charset.
No MP4 mapping, content inspection or audio decoding is introduced.
Additional registered aliases are outside this change's scope.
Tests
GitHub Actions passed on this exact head: Validate and test, Headers, Scalafmt. Validate and test passed for Scala 2.13, Scala 3, next, and Checks.
References
https://www.iana.org/assignments/media-types/audio/aac
netty/netty#16036 (independent implementation)