Update static files to use strong comparison on ETags
This commit is contained in:
parent
33dbd6d78b
commit
a4d2e5ebcd
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
|
||||
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
|
||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
@ -173,7 +173,7 @@ namespace Microsoft.AspNetCore.StaticFiles
|
|||
_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 @@ namespace Microsoft.AspNetCore.StaticFiles
|
|||
_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 @@ namespace Microsoft.AspNetCore.StaticFiles
|
|||
ignoreRangeHeader = true;
|
||||
}
|
||||
}
|
||||
else if (ifRangeHeader.EntityTag != null && !_etag.Equals(ifRangeHeader.EntityTag))
|
||||
else if (ifRangeHeader.EntityTag != null && !ifRangeHeader.EntityTag.Compare(_etag, useStrongComparison: true))
|
||||
{
|
||||
ignoreRangeHeader = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue