Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Commit

Permalink
Add .dmg/.pkg mimetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jan 5, 2021
1 parent c1358e5 commit 6571e1c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ServiceStack.Text/HttpUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,8 @@ public static class MimeTypes
public const string JavaScript = "text/javascript";
public const string WebAssembly = "application/wasm";
public const string Jar = "application/java-archive";
public const string Dmg = "application/x-apple-diskimage";
public const string Pkg = "application/x-newton-compatible-pkg";

public const string FormUrlEncoded = "application/x-www-form-urlencoded";
public const string MultiPartFormData = "multipart/form-data";
Expand Down Expand Up @@ -1517,6 +1519,8 @@ public static bool IsBinary(string contentType)
case Compressed:
case WebAssembly:
case Jar:
case Dmg:
case Pkg:
return true;
}

Expand Down Expand Up @@ -1804,6 +1808,11 @@ public static string GetMimeType(string fileNameOrExt)

case "wasm":
return WebAssembly;

case "dmg":
return Dmg;
case "pkg":
return Pkg;

default:
return "application/" + fileExt;
Expand Down

0 comments on commit 6571e1c

Please sign in to comment.