Skip to content

net/http: Fetch API-based Transport panics when request has no body #60809

Closed
@dmitshur

Description

@dmitshur

The req.Body.Close() calls were refactored in CL 458395 to happen in the success/failure callbacks. The original location was inside an if req.Body != nil block, but the new location missed that check, causing Transport.RoundTrip to panic whenever the request doesn't have a body.

CC @golang/js, @golang/wasm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.OS-JSarch-wasmWebAssembly issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions