Skip to content

Commit

Permalink
Merge pull request #75 from gofiber/zstd
Browse files Browse the repository at this point in the history
RFC8478 - Add the application/zstd Media Type
  • Loading branch information
ReneWerner87 authored Mar 25, 2024
2 parents 6bc2e92 + 0d1cbbd commit b1e3dbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ var mimeExtensions = map[string]string{
"xhtml": "application/xhtml+xml",
"xspf": "application/xspf+xml",
"zip": "application/zip",
"zst": "application/zstd",
"bin": "application/octet-stream",
"exe": "application/octet-stream",
"dll": "application/octet-stream",
Expand Down
6 changes: 6 additions & 0 deletions http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ func Test_GetMIME(t *testing.T) {
res = GetMIME("unknown")
require.Equal(t, MIMEOctetStream, res)

res = GetMIME(".zst")
require.Equal(t, "application/zstd", res)

res = GetMIME("zst")
require.Equal(t, "application/zstd", res)

// empty case
res = GetMIME("")
require.Equal(t, "", res)
Expand Down

0 comments on commit b1e3dbb

Please sign in to comment.