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

Commit 6571e1c

Browse files
committed
Add .dmg/.pkg mimetypes
1 parent c1358e5 commit 6571e1c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ServiceStack.Text/HttpUtils.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,8 @@ public static class MimeTypes
13921392
public const string JavaScript = "text/javascript";
13931393
public const string WebAssembly = "application/wasm";
13941394
public const string Jar = "application/java-archive";
1395+
public const string Dmg = "application/x-apple-diskimage";
1396+
public const string Pkg = "application/x-newton-compatible-pkg";
13951397

13961398
public const string FormUrlEncoded = "application/x-www-form-urlencoded";
13971399
public const string MultiPartFormData = "multipart/form-data";
@@ -1517,6 +1519,8 @@ public static bool IsBinary(string contentType)
15171519
case Compressed:
15181520
case WebAssembly:
15191521
case Jar:
1522+
case Dmg:
1523+
case Pkg:
15201524
return true;
15211525
}
15221526

@@ -1804,6 +1808,11 @@ public static string GetMimeType(string fileNameOrExt)
18041808

18051809
case "wasm":
18061810
return WebAssembly;
1811+
1812+
case "dmg":
1813+
return Dmg;
1814+
case "pkg":
1815+
return Pkg;
18071816

18081817
default:
18091818
return "application/" + fileExt;

0 commit comments

Comments
 (0)