Repository navigation
feat: register the web app manifest media type - #1523
Merged
Merged
Conversation
He-Pin
force-pushed
the
feat/webmanifest-media-type
branch
2 times, most recently
from
November 20, 2026 06:34
58a4931 to
3773a8c
Compare
He-Pin
marked this pull request as ready for review
November 20, 2026 06:56
nvollmar
approved these changes
Nov 20, 2026
Motivation: Web app manifests have the registered application/manifest+json media type and .webmanifest extension, but the default registry does not recognize them. Modification: Add fixed-UTF-8 Scala and Java media type constants and the exact extension mapping. Cover typed parsing, extension lookup, Java use, and the file resolver's independence from the default text charset. Document the mapping. Use explicit nested foreach blocks for the two resolver test dimensions, so the filename is scoped consistently across Scala versions. Result: Web manifests resolve to application/manifest+json without a charset parameter. Existing .json and .manifest mappings remain unchanged. Tests: - Prior revision passed the Scala 2.13 CI job; Scala 3 and next failed to compile the new resolver test with an out-of-scope filename. - The revised test body was compiled and run for all four resolver cases offline on Scala 2.13.18; Scalafmt and git diff --check passed. - Scala 3 and next have not been rerun on this revision. References: https://www.iana.org/assignments/media-types/application/manifest+json https://www.rfc-editor.org/rfc/rfc8259#section-8.1 netty/netty#16036 (independent implementation)
He-Pin
force-pushed
the
feat/webmanifest-media-type
branch
from
November 20, 2026 14:34
3773a8c to
6011974
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
Web app manifests have the registered application/manifest+json media type
and .webmanifest extension, but the default registry does not recognize them.
Modification
Add fixed-UTF-8 Scala and Java media type constants and the exact extension
mapping. Cover typed parsing, extension lookup, Java use, and the file
resolver's independence from the default text charset. Document the mapping.
Result
Web manifests resolve to application/manifest+json without a charset
parameter. Existing .json and .manifest mappings remain unchanged.
Tests
testkit artifacts unavailable. Unchanged parser compile has an existing
non-exhaustive-match warning.
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/application/manifest+json
https://www.rfc-editor.org/rfc/rfc8259#section-8.1
netty/netty#16036 (independent implementation)