aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ImageController.cs
diff options
context:
space:
mode:
authorGary Wilber <Spacetech326@gmail.com>2020-11-19 18:44:16 -0800
committerGary Wilber <Spacetech326@gmail.com>2020-11-19 18:44:16 -0800
commit4a22380565bbf5909ad064461ae9cb59a410a063 (patch)
tree6bbc22a8979d6544f2d373413f7f75255945e9a3 /Jellyfin.Api/Controllers/ImageController.cs
parentd6585e7ff2e14234201e3fe6a75a5af2170c7804 (diff)
parent90e4066b12e3b39124f9f4efcb20a0e51499a038 (diff)
Merge remote-tracking branch 'upstream/master' into library_scan_speed
Diffstat (limited to 'Jellyfin.Api/Controllers/ImageController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ImageController.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/ImageController.cs b/Jellyfin.Api/Controllers/ImageController.cs
index 4a67c1aed..76e53b9a5 100644
--- a/Jellyfin.Api/Controllers/ImageController.cs
+++ b/Jellyfin.Api/Controllers/ImageController.cs
@@ -5,6 +5,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
+using System.Net.Mime;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Api.Attributes;
@@ -1268,7 +1269,7 @@ namespace Jellyfin.Api.Controllers
Response.Headers.Add(key, value);
}
- Response.ContentType = imageContentType;
+ Response.ContentType = imageContentType ?? MediaTypeNames.Text.Plain;
Response.Headers.Add(HeaderNames.Age, Convert.ToInt64((DateTime.UtcNow - dateImageModified).TotalSeconds).ToString(CultureInfo.InvariantCulture));
Response.Headers.Add(HeaderNames.Vary, HeaderNames.Accept);