What are the MIME types for .NET project source code files?

混江龙づ霸主 提交于 2020-01-01 10:28:16

问题


Are there official MIME types for the .cs (C# source), .resx, .aspx, etc. files in a .NET project?

If no official types are defined, any recommendations on good MIME types? This will be exposed via Apache and the mod_dav_svn module when viewing a Subversion repository from a web browser, so anything that'll help Firefox et al render the file correctly would do the trick.


回答1:


Use the information on this answer to easily determine the MIME types.

For example (running on Windows XP SP2) I got the following results:

  • cs - text/plain
  • resx - text/xml



回答2:


Apparently Gnome uses text/x-csharp for C# source files, but I'd personally expect .cs and .aspx files to be text/plain and .resx to be text/xml.



来源:https://stackoverflow.com/questions/208056/what-are-the-mime-types-for-net-project-source-code-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!