This repository was archived by the owner on Oct 11, 2023. It is now read-only.
Commit 02bd4e8
committed
RequestLoggingMiddleware is not aware certain HTTP response can not carry body.
Setting body on HTTP status such as 204 will cause exception. This repros today
already by going through a bike renting flow and examine the logs of Gateway
container. If running under a debugger, the exception will fail the request.
Fix the issue by skipping setting HTTP body for 204, 205 and 304. This is what
asp.net core checks in AspNetCore\src\Servers\Kestrel\Core\src\Internal\Http\
HttpProtocol.cs.1 parent 8bf2ae3 commit 02bd4e8
File tree
1 file changed
+10
-4
lines changed- samples/BikeSharingApp/Gateway/Middleware
1 file changed
+10
-4
lines changedLines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | | - | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
0 commit comments