HttpLogging drops Request/Response bodies if Stream has been closed #61489
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Is there an existing issue for this?
Describe the bug
The
HttpLoggingMiddleware
logs empty request/response bodies in case the subsequent middleware closes the corresponding stream. For example,CoreWCF
does that for theBasicHttpBinding
.Expected Behavior
Request and Response bodies are being logged whether the stream has been closed or not.
Steps To Reproduce
Logging:LogLevel:Microsoft.AspNetCore
toInformation
inappsettings*.json
Program.cs
HttpLoggingMiddleware
doesn't log neither Request nor Response bodies:Exceptions (if any)
No response
.NET Version
10.0.100-preview.4.25207.10
Anything else?
No response
The text was updated successfully, but these errors were encountered: