Make the char array for utf8 decoding smaller

This commit is contained in:
David Fowler 2016-08-31 01:17:56 -07:00
parent 1ecef8094a
commit 6795ca2f78
1 changed files with 2 additions and 1 deletions

View File

@ -150,7 +150,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
var decoder = _utf8.GetDecoder();
var length = start.GetLength(end);
var charLength = length * 2;
var charLength = length;
// Worse case is 1 byte = 1 char
var chars = new char[charLength];
var charIndex = 0;