Commit a5f6c7f
committed
Fix request body double-read in OTLP trace proxy handler
Parse JSON from the already-read body bytes instead of re-reading the
request stream via HttpServerRequest.schemaBodyJson. HTTP request bodies
are stream-based and can only be consumed once, so the second read would
silently fail (caught by Effect.catch), causing local browser trace
recording to never work.
Also set the correct content-type (application/json) on the forwarded
upstream request body.1 parent b2bd70a commit a5f6c7f
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
0 commit comments