Made ChunkingCookieManager's default chunk size public

This commit is contained in:
Kiran Challa 2016-10-31 10:46:18 -07:00
parent 2d1c56ce5c
commit 500201bdf7
1 changed files with 6 additions and 1 deletions

View File

@ -30,6 +30,11 @@ namespace Microsoft.AspNetCore.Internal
internal class ChunkingCookieManager internal class ChunkingCookieManager
{ {
#endif #endif
/// <summary>
/// The default maximum size of characters in a cookie to send back to the client.
/// </summary>
public const int DefaultChunkSize = 4070;
private const string ChunkKeySuffix = "C"; private const string ChunkKeySuffix = "C";
private const string ChunkCountPrefix = "chunks-"; 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. // Lowest common denominator. Safari has the lowest known limit (4093), and we leave little extra just in case.
// See http://browsercookielimits.x64.me/. // See http://browsercookielimits.x64.me/.
// Leave at least 20 in case CookiePolicy tries to add 'secure' and/or 'httponly'. // Leave at least 20 in case CookiePolicy tries to add 'secure' and/or 'httponly'.
ChunkSize = 4070; ChunkSize = DefaultChunkSize;
ThrowForPartialCookies = true; ThrowForPartialCookies = true;
} }