Skip to content

Commit b306dcb

Browse files
committed
nit
1 parent 8dd6de3 commit b306dcb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Servers/IIS/IIS/src/Core/IISHttpContext.IO.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace Microsoft.AspNetCore.Server.IIS.Core
1313
internal partial class IISHttpContext
1414
{
1515
private long _consumedBytes;
16+
1617
/// <summary>
1718
/// Reads data from the Input pipe to the user.
1819
/// </summary>
@@ -103,7 +104,7 @@ private async Task ReadBody()
103104
break;
104105
}
105106

106-
if (RequestHeaders.ContentLength > MaxRequestBodySize)
107+
if (_consumedBytes > MaxRequestBodySize)
107108
{
108109
BadHttpRequestException.Throw(RequestRejectionReason.RequestBodyTooLarge);
109110
}

0 commit comments

Comments
 (0)