浏览代码

Merge pull request #3908 from crobibero/xml-formatter

Use proper mediatypename
Bond-009 4 年之前
父节点
当前提交
57cc08691a
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      Jellyfin.Server/Formatters/XmlOutputFormatter.cs

+ 3 - 2
Jellyfin.Server/Formatters/XmlOutputFormatter.cs

@@ -1,4 +1,5 @@
-using System.Text;
+using System.Net.Mime;
+using System.Text;
 using System.Threading.Tasks;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc.Formatters;
@@ -15,7 +16,7 @@ namespace Jellyfin.Server.Formatters
         /// </summary>
         public XmlOutputFormatter()
         {
-            SupportedMediaTypes.Add("text/xml");
+            SupportedMediaTypes.Add(MediaTypeNames.Text.Xml);
             SupportedMediaTypes.Add("text/xml;charset=UTF-8");
             SupportedEncodings.Add(Encoding.UTF8);
             SupportedEncodings.Add(Encoding.Unicode);