MIME: added AVIF and APNG image formats.

AVIF is a modern image format based on the AV1 video codec.  It generally has
better compression than other widely used formats (WebP, JPEG, PNG, and GIF)
and is designed to supersede them.  Support was already added to the latest
version of Chrome.

APNG extends PNG to permit animated images that work similarly to animated GIF.
It's supported by most modern browsers.

Also removed duplicated ".svg" entry.
This commit is contained in:
Valentin Bartenev
2020-09-29 23:23:32 +03:00
parent 61eba6eef1
commit 67d33fac66

View File

@@ -469,15 +469,18 @@ nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash)
{ nxt_string("text/html"), ".htm" }, { nxt_string("text/html"), ".htm" },
{ nxt_string("text/css"), ".css" }, { nxt_string("text/css"), ".css" },
{ nxt_string("image/svg+xml"), ".svg" },
{ nxt_string("image/svg+xml"), ".svg" }, { nxt_string("image/svg+xml"), ".svg" },
{ nxt_string("image/webp"), ".webp" }, { nxt_string("image/webp"), ".webp" },
{ nxt_string("image/png"), ".png" }, { nxt_string("image/png"), ".png" },
{ nxt_string("image/apng"), ".apng" },
{ nxt_string("image/jpeg"), ".jpeg" }, { nxt_string("image/jpeg"), ".jpeg" },
{ nxt_string("image/jpeg"), ".jpg" }, { nxt_string("image/jpeg"), ".jpg" },
{ nxt_string("image/gif"), ".gif" }, { nxt_string("image/gif"), ".gif" },
{ nxt_string("image/x-icon"), ".ico" }, { nxt_string("image/x-icon"), ".ico" },
{ nxt_string("image/avif"), ".avif" },
{ nxt_string("image/avif-sequence"), ".avifs" },
{ nxt_string("font/woff"), ".woff" }, { nxt_string("font/woff"), ".woff" },
{ nxt_string("font/woff2"), ".woff2" }, { nxt_string("font/woff2"), ".woff2" },
{ nxt_string("font/otf"), ".otf" }, { nxt_string("font/otf"), ".otf" },