aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ImageController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-20 10:35:46 -0700
committercrobibero <cody@robibe.ro>2020-11-20 10:35:46 -0700
commit8f58f63b0886670922aa77431e69b80b969d675a (patch)
tree9436313b2c5ca856f72eabba4606099c68665475 /Jellyfin.Api/Controllers/ImageController.cs
parent53697ac39a624d3a32b79883f4e0321b3a7ecb49 (diff)
parentd2cef78db3c6f5c1063f8205ed5309f5243be66b (diff)
Merge remote-tracking branch 'upstream/master' into split-api
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 bb0f27312..1a8037614 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;
@@ -1898,7 +1899,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);