_maxRentedBufferSize up to 1MB (#12143)

This commit is contained in:
Carlos J. Aliaga 2019-07-15 18:53:04 +02:00 committed by Chris Ross
parent 01261b5f2c
commit deb51b83f4
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ namespace Microsoft.AspNetCore.WebUtilities
}
_bytePool = bytePool;
if (memoryThreshold < _maxRentedBufferSize)
if (memoryThreshold <= _maxRentedBufferSize)
{
_rentedBuffer = bytePool.Rent(memoryThreshold);
_buffer = new MemoryStream(_rentedBuffer);
@ -115,7 +115,7 @@ namespace Microsoft.AspNetCore.WebUtilities
}
_bytePool = bytePool;
if (memoryThreshold < _maxRentedBufferSize)
if (memoryThreshold <= _maxRentedBufferSize)
{
_rentedBuffer = bytePool.Rent(memoryThreshold);
_buffer = new MemoryStream(_rentedBuffer);