Fix review comment

This commit is contained in:
Shadowghost
2026-04-19 10:27:23 +02:00
parent e71bb7e904
commit 8a1ad14faf

View File

@@ -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();