ITADN

Response body handling differs from other runtimes

#1275Openchrisfarber 创建于 2026-01-07
C
chrisfarbercommented
I've found a case where the behavior of the JS Compute runtime differs from other runtimes. ```js let res = new Response("ORIGINAL_BODY_CONTENT"); res = new Response(res.body, res); const body = await res.arrayBuffer(); res = new Response(body, res); ``` In the other runtimes I’ve tested (node, webkit, chrome), the final res’s body will be `"ORIGINAL_BODY_CONTENT"`, however, in Compute, it will be empty. Here’s a repository that demonstrates this: https://github.com/fastly/cfarber-response-body-loss-repro/
1 条评论