Skip to content

fetch(request) ignores Request.signal #5286

@Monti-27

Description

@Monti-27

When fetch() is called with a Request object, Boa currently seems to ignore the signal stored on that request.

A simple repro is:

const ctrl = new AbortController();
const request = new Request("http://unit.test", { signal: ctrl.signal });
ctrl.abort("stop");
await fetch(request);

This should reject with the abort reason, but right now it fulfills.

The current path looks like it only reads signal from the second fetch(..., options) argument. When the resource is a Request, fetch_inner() clones the inner HTTP request, but JsRequest does not carry the signal through that path.

So the request level abort state gets lost before the fetcher sees it.

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