Просмотр исходного кода

Change csv content type to text/csv (#16696)

* Change csv content type to text/csv

According to RFC4180: https://tools.ietf.org/html/rfc4180 MIME type for .csv file should be "text/csv"

* Add comment
nufiko 6 лет назад
Родитель
Сommit
93030a8819

+ 1 - 1
src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs

@@ -76,7 +76,7 @@ namespace Microsoft.AspNetCore.StaticFiles
                 { ".crt", "application/x-x509-ca-cert" },
                 { ".csh", "application/x-csh" },
                 { ".css", "text/css" },
-                { ".csv", "application/octet-stream" },
+                { ".csv", "text/csv" }, // https://tools.ietf.org/html/rfc7111#section-5.1
                 { ".cur", "application/octet-stream" },
                 { ".dcr", "application/x-director" },
                 { ".deploy", "application/octet-stream" },