From 500201bdf769e9cba67c5b0801801f6ec4678da5 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Mon, 31 Oct 2016 10:46:18 -0700 Subject: [PATCH] Made ChunkingCookieManager's default chunk size public --- .../ChunkingCookieManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.ChunkingCookieManager.Sources/ChunkingCookieManager.cs b/src/Microsoft.AspNetCore.ChunkingCookieManager.Sources/ChunkingCookieManager.cs index 26fe0809c5..16426507ce 100644 --- a/src/Microsoft.AspNetCore.ChunkingCookieManager.Sources/ChunkingCookieManager.cs +++ b/src/Microsoft.AspNetCore.ChunkingCookieManager.Sources/ChunkingCookieManager.cs @@ -30,6 +30,11 @@ namespace Microsoft.AspNetCore.Internal internal class ChunkingCookieManager { #endif + /// + /// The default maximum size of characters in a cookie to send back to the client. + /// + public const int DefaultChunkSize = 4070; + private const string ChunkKeySuffix = "C"; private const string ChunkCountPrefix = "chunks-"; @@ -38,7 +43,7 @@ namespace Microsoft.AspNetCore.Internal // Lowest common denominator. Safari has the lowest known limit (4093), and we leave little extra just in case. // See http://browsercookielimits.x64.me/. // Leave at least 20 in case CookiePolicy tries to add 'secure' and/or 'httponly'. - ChunkSize = 4070; + ChunkSize = DefaultChunkSize; ThrowForPartialCookies = true; }