Skip to content

net/http: use of request body in WASM Roundtripper panics #26349

Closed
@johanbrandhorst

Description

@johanbrandhorst

What version of Go are you using (go version)?

tip

Does this issue reproduce with the latest release?

No, no WASM

What operating system and processor architecture are you using (go env)?

linux amd64

What did you do?

I sent a request with a body in a binary compiled for WASM.

What did you expect to see?

The request would be sent successfully.

What did you see instead?

When using a request body with the new http.RoundTripper implemented for WASM, the call to set the body on the JavaScript fetch object panics.

Notes

Initially reported by John Marshall in https://groups.google.com/forum/#!topic/golang-nuts/7ZIU-YKoDVw. The bug was introduced with bafe466, a simple case of missing a use of a slice in roundtrip_js.go: https://github.com/golang/go/blob/master/src/net/http/roundtrip_js.go#L63.

Activity

changed the title [-]net/http: use of request body in WASM Roundtripped panics[/-] [+]net/http: use of request body in WASM Roundtripper panics[/+] on Jul 12, 2018
johanbrandhorst

johanbrandhorst commented on Jul 12, 2018

@johanbrandhorst
MemberAuthor

I will submit a fix for this.

gopherbot

gopherbot commented on Jul 12, 2018

@gopherbot
Contributor

Change https://golang.org/cl/123537 mentions this issue: net/http: correct use of byte slice in js syscall

added
NeedsFixThe path to resolution is known, but the work has not been done.
arch-wasmWebAssembly issues
on Jul 12, 2018
added this to the Go1.11 milestone on Jul 12, 2018
locked and limited conversation to collaborators on Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @agnivade@johanbrandhorst@gopherbot

        Issue actions

          net/http: use of request body in WASM Roundtripper panics · Issue #26349 · golang/go