IHttpRequestBodyDetectionFeature
returns true for GET requests with HTTP/3
#58753
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
feature-kestrel
Is there an existing issue for this?
Describe the bug
Unlike with HTTP/2, the HTTP/3 implementation does not check for
ReceivedEmptyRequestBody
when creating the message body, which means the body detection feature returnstrue
even for requests without one.aspnetcore/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Stream.cs
Lines 194 to 211 in 46ea84f
aspnetcore/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs
Lines 947 to 959 in 46ea84f
Expected Behavior
IHttpRequestBodyDetectionFeature
returnsfalse
for requests where it's known from the start that there is no body.Steps To Reproduce
IHttpRequestBodyDetectionFeature.CanHaveBody
Exceptions (if any)
N/A
.NET Version
No response
Anything else?
Hit in YARP when downgrading HTTP/3 requests to HTTP/1.1: dotnet/yarp#2644.
The text was updated successfully, but these errors were encountered: