Skip to content

Commit

Permalink
Add essential Content-Types #10703
Browse files Browse the repository at this point in the history
(cherry picked from commit b3641ae)
  • Loading branch information
rymsha committed Nov 21, 2024
1 parent c60352c commit aca126a
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,40 @@ private MediaTypes()
this.mediaTypes.put( "png", MediaType.PNG );
this.mediaTypes.put( "jpeg", MediaType.JPEG );
this.mediaTypes.put( "jpg", MediaType.JPEG );
this.mediaTypes.put( "bmp", MediaType.BMP );
this.mediaTypes.put( "ico", MediaType.ICO );
this.mediaTypes.put( "webp", MediaType.WEBP );
this.mediaTypes.put( "avif", MediaType.create( "image", "avif" ) );
this.mediaTypes.put( "apng", MediaType.create( "image", "apng" ) );
this.mediaTypes.put( "pdf", MediaType.PDF );
this.mediaTypes.put( "json", MediaType.JSON_UTF_8.withoutParameters() );
this.mediaTypes.put( "jsonld", MediaType.create( "application", "ld+json" ) );
this.mediaTypes.put( "webmanifest", MediaType.MANIFEST_JSON_UTF_8.withoutParameters() );
this.mediaTypes.put( "js", MediaType.JAVASCRIPT_UTF_8.withoutParameters() );
this.mediaTypes.put( "es", MediaType.JAVASCRIPT_UTF_8.withoutParameters() );
this.mediaTypes.put( "es6", MediaType.JAVASCRIPT_UTF_8.withoutParameters() );
this.mediaTypes.put( "mjs", MediaType.JAVASCRIPT_UTF_8.withoutParameters() );
this.mediaTypes.put( "css", MediaType.CSS_UTF_8.withoutParameters() );
this.mediaTypes.put( "htm", MediaType.HTML_UTF_8.withoutParameters() );
this.mediaTypes.put( "html", MediaType.HTML_UTF_8.withoutParameters() );
this.mediaTypes.put( "xml", MediaType.XML_UTF_8.withoutParameters() );
this.mediaTypes.put( "svg", MediaType.SVG_UTF_8.withoutParameters() );
this.mediaTypes.put( "txt", MediaType.PLAIN_TEXT_UTF_8.withoutParameters() );
this.mediaTypes.put( "ics", MediaType.I_CALENDAR_UTF_8.withoutParameters() );
this.mediaTypes.put( "aac", MediaType.AAC_AUDIO );
this.mediaTypes.put( "mp3", MediaType.MPEG_AUDIO );
this.mediaTypes.put( "mp4", MediaType.MP4_VIDEO );
this.mediaTypes.put( "mpeg", MediaType.MPEG_VIDEO );
this.mediaTypes.put( "oga", MediaType.OGG_AUDIO );
this.mediaTypes.put( "ogv", MediaType.OGG_VIDEO );
this.mediaTypes.put( "weba", MediaType.WEBM_AUDIO );
this.mediaTypes.put( "webm", MediaType.WEBM_VIDEO );
this.mediaTypes.put( "flac", MediaType.create( "audio", "flac" ) );
this.mediaTypes.put( "woff", MediaType.create( "font", "woff" ) );
this.mediaTypes.put( "woff2", MediaType.create( "font", "woff2" ) );
this.mediaTypes.put( "eot", MediaType.EOT );
this.mediaTypes.put( "ttf", MediaType.create( "font", "ttf" ) );
this.mediaTypes.put( "otf", MediaType.create( "font", "otf" ) );
}

@Override
Expand Down

0 comments on commit aca126a

Please sign in to comment.