aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jellyfin.Api/Controllers/ImageController.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/ImageController.cs b/Jellyfin.Api/Controllers/ImageController.cs
index 88cd6724bb..ae792142b4 100644
--- a/Jellyfin.Api/Controllers/ImageController.cs
+++ b/Jellyfin.Api/Controllers/ImageController.cs
@@ -2039,7 +2039,9 @@ public class ImageController : BaseJellyfinApiController
// Check If-None-Match header for ETag-based validation (preferred over If-Modified-Since)
var ifNoneMatch = Request.Headers[HeaderNames.IfNoneMatch].ToString();
- if (!string.IsNullOrEmpty(ifNoneMatch) && (ifNoneMatch == $"\"{tag}\"" || ifNoneMatch == tag))
+ if (!string.IsNullOrEmpty(ifNoneMatch)
+ && (string.Equals(ifNoneMatch, $"\"{tag}\"", StringComparison.Ordinal)
+ || string.Equals(ifNoneMatch, tag, StringComparison.Ordinal)))
{
Response.StatusCode = StatusCodes.Status304NotModified;
return new ContentResult();