Skip to content

Commit 99067e2

Browse files
feiyun0112mus65
andauthored
Update src/Middleware/RequestDecompression/src/RequestDecompressionMiddleware.cs
Co-authored-by: mus65 <[email protected]>
1 parent 6185c01 commit 99067e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Middleware/RequestDecompression/src/RequestDecompressionMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private async Task InvokeCore(HttpContext context, Stream decompressionStream)
6363
?? context.Features.Get<IHttpMaxRequestBodySizeFeature>()?.MaxRequestBodySize;
6464

6565
context.Request.Body = new SizeLimitedStream(decompressionStream, sizeLimit, (long totalBytesRead, long sizeLimit) => throw new BadHttpRequestException(
66-
$"The request's Content-Length {totalBytesRead} is larger than the request body size limit {sizeLimit}.",
66+
$"The decompressed request body is larger than the request body size limit {sizeLimit}.",
6767
StatusCodes.Status413PayloadTooLarge));
6868
await _next(context);
6969
}

0 commit comments

Comments
 (0)