#1349 Don't throw for partial cookies

This commit is contained in:
Chris Ross (ASP.NET) 2017-10-11 16:10:24 -07:00
parent bd07f8b683
commit 824539f47a
3 changed files with 2 additions and 3 deletions

View File

@ -44,7 +44,6 @@ namespace Microsoft.AspNetCore.Internal
// See http://browsercookielimits.x64.me/.
// Leave at least 40 in case CookiePolicy tries to add 'secure', 'samesite=strict' and/or 'httponly'.
ChunkSize = DefaultChunkSize;
ThrowForPartialCookies = true;
}
/// <summary>

View File

@ -25,7 +25,6 @@ namespace Microsoft.Owin.Security.Interop
// See http://browsercookielimits.x64.me/.
// Leave at least 20 in case CookiePolicy tries to add 'secure' and/or 'httponly'.
ChunkSize = 4070;
ThrowForPartialCookies = true;
}
/// <summary>

View File

@ -81,7 +81,8 @@ namespace Microsoft.AspNetCore.Internal
"TestCookieC7=STUVWXYZ"
};
Assert.Throws<FormatException>(() => new ChunkingCookieManager().GetRequestCookie(context, "TestCookie"));
Assert.Throws<FormatException>(() => new ChunkingCookieManager() { ThrowForPartialCookies = true }
.GetRequestCookie(context, "TestCookie"));
}
[Fact]