Skip to content

Kestrel error messages should include body size information with "Request body too large" exception #4773

@jkotalik

Description

@jkotalik

In HttpsSys, when the request body size was too large, it throws an exception with information about the size limits ex:

"System.IO.IOException: The request's Content-Length 15 is larger than the request body size limit 10."

while Kestrel's message is simply:

Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Request body too large.

Kestrel should probably include this information.

Metadata

Metadata

Assignees

Labels

affected-very-fewThis issue impacts very few customersarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.feature-kestrelhelp wantedUp for grabs. We would accept a PR to help resolve this issueseverity-nice-to-haveThis label is used by an internal tool

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions