Nancy icon indicating copy to clipboard operation
Nancy copied to clipboard

Mime Type for CSV files missing

Open billgeek opened this issue 7 years ago • 0 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have verified that I am running the latest version of Nancy
  • [X] I have verified if the problem exist in both DEBUG and RELEASE mode
  • [X] I have searched open and closed issues to ensure it has not already been reported

Description

MimeTypes.GetMimeType("filename.csv") returns application/octet-stream which is not correct according to the RFC 7111. It should be text/csv.

Steps to Reproduce

  • Create any project
  • Get the mime type for a CSV file
  • Observe issue

System Configuration

Any environment

  • Nancy version:
  • Nancy host
    • [ ] Nancy.Hosting.Aspnet
    • [X] Nancy.Hosting.Self
    • [ ] Nancy.Owin
    • [ ] Other:
  • Other Nancy packages and versions:
  • Environment (Operating system, version and so on):
  • .NET Framework version:
  • Additional information: the workaround at the moment is to register the correct mime type on application startup. (MimeTypes.AddType("csv", "text/csv");)

The source file (Nancy\src\Nancy\MimeTypes.cs) does not include an entry for CSV files.

billgeek avatar Aug 09 '18 13:08 billgeek