Skip to content

Replace jakarta.activation with an internal MIME-type parser#2193

Merged
hyperxpro merged 1 commit into
mainfrom
mime-parser
Jun 12, 2026
Merged

Replace jakarta.activation with an internal MIME-type parser#2193
hyperxpro merged 1 commit into
mainfrom
mime-parser

Conversation

@hyperxpro

@hyperxpro hyperxpro commented Jun 12, 2026

Copy link
Copy Markdown
Member

Motivation:

Drop the unmaintained com.sun.activation:jakarta.activation dependency (last released 2021; its only use was MimetypesFileTypeMap for filename to content-type detection in FileLikePart), removing downstream classpath bloat and Jakarta Mail/EE version conflicts.

Modification:

Add a package-private MimeTypes class that parses the bundled ahc-mime.types into an extension to type map (case-insensitive, last-dot lookup, application/octet-stream default, same contract as JAF and the same algorithm Spring, jshttp and httpd use), and refresh ahc-mime.types from upstream Apache httpd (adds wasm, avif, jxl, woff2 and more, modernizes js to text/javascript and the font types).

Result:

Fixes #2190

@hyperxpro hyperxpro merged commit d54911f into main Jun 12, 2026
17 checks passed
@hyperxpro hyperxpro deleted the mime-parser branch June 12, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace unmaintained com.sun.activation:jakarta.activation with jakarta.activation-api + Angus Activation (or eliminate the dependency)

1 participant