Commit a8aed1a
fix(proxy): ensure correct headers are set when forwarding request (#768)
# What?
Fixes an issue where proxy would fail because a response could come as a
streamed buffer
# Why?
We were not taking into account that we are collecting the body before
even forwarding the request to the Lambda Runtime, so headers will sent
`as-is`. Causing issues when a streamed buffer arrived to ourselves as
`transfer-encoding: chunked` which will confuse the runtime since we are
proxying it already.
# Notes
Also added a `env` var check where you can enable proxy as Go, through
the `DD_EXPERIMENTAL_PROXY_ENABLED=true`
---------
Co-authored-by: AJ Stuyvenberg <aj.stuyvenberg@datadoghq.com>
Co-authored-by: Romain Marcadier <romain.marcadier@datadoghq.com>1 parent 5fbe50d commit a8aed1a
2 files changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
307 | 313 | | |
308 | 314 | | |
309 | 315 | | |
| |||
333 | 339 | | |
334 | 340 | | |
335 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
336 | 348 | | |
337 | 349 | | |
338 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | | - | |
27 | | - | |
28 | 32 | | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
0 commit comments