diff --git a/NuGet.config b/NuGet.config index 1707938..2ad0f8b 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.StaticFiles/StaticFileContext.cs b/src/Microsoft.AspNetCore.StaticFiles/StaticFileContext.cs index 3e56967..b2edbe3 100644 --- a/src/Microsoft.AspNetCore.StaticFiles/StaticFileContext.cs +++ b/src/Microsoft.AspNetCore.StaticFiles/StaticFileContext.cs @@ -173,7 +173,7 @@ private void ComputeIfMatch() _ifMatchState = PreconditionState.PreconditionFailed; foreach (var etag in ifMatch) { - if (etag.Equals(EntityTagHeaderValue.Any) || etag.Equals(_etag)) + if (etag.Equals(EntityTagHeaderValue.Any) || etag.Compare(_etag, useStrongComparison: true)) { _ifMatchState = PreconditionState.ShouldProcess; break; @@ -188,7 +188,7 @@ private void ComputeIfMatch() _ifNoneMatchState = PreconditionState.ShouldProcess; foreach (var etag in ifNoneMatch) { - if (etag.Equals(EntityTagHeaderValue.Any) || etag.Equals(_etag)) + if (etag.Equals(EntityTagHeaderValue.Any) || etag.Compare(_etag, useStrongComparison: true)) { _ifNoneMatchState = PreconditionState.NotModified; break; @@ -273,7 +273,7 @@ private void ComputeRange() ignoreRangeHeader = true; } } - else if (ifRangeHeader.EntityTag != null && !_etag.Equals(ifRangeHeader.EntityTag)) + else if (ifRangeHeader.EntityTag != null && !ifRangeHeader.EntityTag.Compare(_etag, useStrongComparison: true)) { ignoreRangeHeader = true; }