Open
Description
Is there an existing issue for this?
- I have searched the existing issues
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 returns true
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
returns false
for requests where it's known from the start that there is no body.
Steps To Reproduce
- Send an HTTP/3 GET request to Kestrel
- Check
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.