Skip to content

Response body handling differs from other runtimes #1275

@chrisfarber

Description

@chrisfarber

I've found a case where the behavior of the JS Compute runtime differs from other runtimes.

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions