Repository navigation
feat(netty-codec-http): more standard http content types - #16036
Merged
normanmaurer merged 3 commits intoJan 9, 2026
Merged
Conversation
Member
|
@ultraviolet-jordan have you signed our ICLA ? https://netty.io/s/icla |
Contributor
Author
I hadn't but it is signed now. Thanks for catching that. |
Member
|
@ultraviolet-jordan thanks! |
normanmaurer
added a commit
that referenced
this pull request
Jan 9, 2026
Motivation: To add more standard http content type values. For reference: https://www.iana.org/assignments/media-types/media-types.xhtml For example, Netty defines `text/css` and `text/html` but not `text/javascript`. Modification: Add new constants to `HttpHeaderValues` defining more standard http content types. I moved `APPLICATION_X_WWW_FORM_URLENCODED` down a few lines to be alphabetical. Result: New constants to `HttpHeaderValues` defining more standard http content types. ---- Please cherry pick into 4.1 and 5.0. Thank you! Co-authored-by: Norman Maurer <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
Jan 9, 2026
Motivation: To add more standard http content type values. For reference: https://www.iana.org/assignments/media-types/media-types.xhtml For example, Netty defines `text/css` and `text/html` but not `text/javascript`. Modification: Add new constants to `HttpHeaderValues` defining more standard http content types. I moved `APPLICATION_X_WWW_FORM_URLENCODED` down a few lines to be alphabetical. Result: New constants to `HttpHeaderValues` defining more standard http content types. ---- Please cherry pick into 4.1 and 5.0. Thank you! Co-authored-by: Norman Maurer <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
Jan 9, 2026
…6121) Motivation: To add more standard http content type values. For reference: https://www.iana.org/assignments/media-types/media-types.xhtml For example, Netty defines `text/css` and `text/html` but not `text/javascript`. Modification: Add new constants to `HttpHeaderValues` defining more standard http content types. I moved `APPLICATION_X_WWW_FORM_URLENCODED` down a few lines to be alphabetical. Result: New constants to `HttpHeaderValues` defining more standard http content types. ---- Please cherry pick into 4.1 and 5.0. Thank you! Co-authored-by: Norman Maurer <[email protected]> Co-authored-by: Jordan <[email protected]>
normanmaurer
added a commit
that referenced
this pull request
Jan 9, 2026
…6122) Motivation: To add more standard http content type values. For reference: https://www.iana.org/assignments/media-types/media-types.xhtml For example, Netty defines `text/css` and `text/html` but not `text/javascript`. Modification: Add new constants to `HttpHeaderValues` defining more standard http content types. I moved `APPLICATION_X_WWW_FORM_URLENCODED` down a few lines to be alphabetical. Result: New constants to `HttpHeaderValues` defining more standard http content types. ---- Please cherry pick into 4.1 and 5.0. Thank you! Co-authored-by: Norman Maurer <[email protected]> Co-authored-by: Jordan <[email protected]>
Closed
Closed
This was referenced Oct 20, 2026
Closed
He-Pin
added a commit
to apache/pekko-http
that referenced
this pull request
Nov 17, 2026
Motivation: Default file serving needs registered binary media types. Modification: Register application/wasm and image/avif with Scala and Java constants, extension mappings and regression coverage. Result: The formats resolve to the appropriate binary types with their correct compression flags. Validation: The owner reports CI passed for this PR. No additional CI inspection or local test run was performed during merge. References: netty/netty#16036
This was referenced Nov 19, 2026
He-Pin
added a commit
to He-Pin/incubator-pekko-http
that referenced
this pull request
Nov 20, 2026
Motivation: RFC 9239 identifies text/javascript as the preferred media type for JavaScript, but the default filename lookup chooses application/javascript. Modification: Register text/javascript for .js and .mjs in the Scala and Java models. Keep application/javascript available for explicit use and parsing. Update the documentation and cover plain and precompressed file lookup. Result: Default file serving uses the preferred media type, with the existing charset and precompression handling. Explicit legacy media types remain supported. References: https://www.rfc-editor.org/rfc/rfc9239.html#section-6.1.1 netty/netty#16036
He-Pin
added a commit
to He-Pin/incubator-pekko-http
that referenced
this pull request
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. Result: Web manifests resolve to application/manifest+json without a charset parameter. Existing .json and .manifest mappings remain unchanged. Tests: - Offline Scala 2.13.18 and Java focused compilation passed. - HeaderSpec selected test: 1 passed with current header parser overlay. - Java positive test method and four extracted resolver cases passed. - Exact main registry assertion failed before and passed after this change. - Cached scalafmt 3.11.5 and Java formatter 1.28.0 applied; diff check passed. - Public javap comparison: only new manifest getters and Java constant. - Full routing suite, sbt checks, MiMa, Scala 3 and CI not run; cached route testkit artifacts unavailable. Unchanged parser compile has an existing non-exhaustive-match warning. 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
added a commit
to He-Pin/incubator-pekko-http
that referenced
this pull request
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
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
added a commit
to apache/pekko-http
that referenced
this pull request
Nov 20, 2026
Motivation: RFC 9239 identifies text/javascript as the preferred media type for JavaScript, but the default filename lookup chooses application/javascript. Modification: Register text/javascript for .js and .mjs in the Scala and Java models. Keep application/javascript available for explicit use and parsing. Update the documentation and cover plain and precompressed file lookup. Result: Default file serving uses the preferred media type, with the existing charset and precompression handling. Explicit legacy media types remain supported. References: https://www.rfc-editor.org/rfc/rfc9239.html#section-6.1.1 netty/netty#16036
He-Pin
added a commit
to He-Pin/incubator-pekko-http
that referenced
this pull request
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
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
added a commit
to apache/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 #1524. https://www.iana.org/assignments/media-types/audio/aac netty/netty#16036 (independent implementation)
He-Pin
added a commit
to apache/pekko-http
that referenced
this pull request
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)
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:
To add more standard http content type values.
For reference: https://www.iana.org/assignments/media-types/media-types.xhtml
For example, Netty defines
text/cssandtext/htmlbut nottext/javascript.Modification:
Add new constants to
HttpHeaderValuesdefining more standard http content types.I moved
APPLICATION_X_WWW_FORM_URLENCODEDdown a few lines to be alphabetical.Result:
New constants to
HttpHeaderValuesdefining more standard http content types.Please cherry pick into 4.1 and 5.0.
Thank you!