Skip to content

Commit

Permalink
Update MIME types associated to font extensions .ttf, .woff, `.wo…
Browse files Browse the repository at this point in the history
…ff2`, and `.otf` (#2065)
  • Loading branch information
davidstosik committed Apr 3, 2023
1 parent b172805 commit f5666bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. For info on
- Introduce `module Rack::BadRequest` which is included in multipart and query parser errors. ([#2019](https://github.com/rack/rack/pull/2019), [@ioquatix])
- MIME type for JavaScript files (`.js`) changed from `application/javascript` to `text/javascript` ([`1bd0f15`](https://github.com/rack/rack/commit/1bd0f1597d8f4a90d47115f3e156a8ce7870c9c8))
- Add `.mjs` MIME type ([#2057](https://github.com/rack/rack/pull/2057), [@axilleas])
- Update MIME types associated to `.ttf`, `.woff`, `.woff2` and `.otf` extensions to use mondern `font/*` types. ([#2065](https://github.com/rack/rack/pull/2065), [@davidstosik])

## [3.0.7] - 2023-03-16

Expand Down Expand Up @@ -871,3 +872,4 @@ Items below this line are from the previously maintained HISTORY.md and NEWS.md
[@amatsuda]: https://github.com/amatsuda "Akira Matsuda"
[@wjordan]: https://github.com/wjordan "Will Jordan"
[@BlakeWilliams]: https://github.com/BlakeWilliams "Blake Williams"
[@davidstosik]: https://github.com/davidstosik "David Stosik"
8 changes: 4 additions & 4 deletions lib/rack/mime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def match?(value, matcher)
".ogx" => "application/ogg",
".org" => "application/vnd.lotus-organizer",
".otc" => "application/vnd.oasis.opendocument.chart-template",
".otf" => "application/vnd.oasis.opendocument.formula-template",
".otf" => "font/otf",
".otg" => "application/vnd.oasis.opendocument.graphics-template",
".oth" => "application/vnd.oasis.opendocument.text-web",
".oti" => "application/vnd.oasis.opendocument.image-template",
Expand Down Expand Up @@ -591,7 +591,7 @@ def match?(value, matcher)
".trm" => "application/x-msterminal",
".ts" => "video/mp2t",
".tsv" => "text/tab-separated-values",
".ttf" => "application/octet-stream",
".ttf" => "font/ttf",
".twd" => "application/vnd.simtech-mindmapper",
".txd" => "application/vnd.genomatix.tuxedo",
".txf" => "application/vnd.mobius.txf",
Expand Down Expand Up @@ -637,8 +637,8 @@ def match?(value, matcher)
".wmv" => "video/x-ms-wmv",
".wmx" => "video/x-ms-wmx",
".wmz" => "application/x-ms-wmz",
".woff" => "application/font-woff",
".woff2" => "application/font-woff2",
".woff" => "font/woff",
".woff2" => "font/woff2",
".wpd" => "application/vnd.wordperfect",
".wpl" => "application/vnd.ms-wpl",
".wps" => "application/vnd.ms-works",
Expand Down

0 comments on commit f5666bc

Please sign in to comment.