Skip to content

net/http: Response.Status text include "number:" prefix in WebAssembly #31736

Closed
@dmitshur

Description

@dmitshur

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

$ go version
go version devel +50ad094 Sun Apr 28 23:51:04 2019 +0000 darwin/amd64

Does this issue reproduce with the latest release?

No.

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

GOOS=js GOARCH=wasm

What did you do?

I compiled this program into WebAssembly and ran it in a browser:

package main

import (
	"fmt"
	"log"
	"net/http"
)

func main() {
	resp, err := http.Get("/")
	if err != nil {
		log.Fatalln(err)
	}
	defer resp.Body.Close()
	fmt.Println(resp.Status)
}

What did you expect to see?

200 OK

What did you see instead?

<number: 200> OK

Cause

This is happening after #29642 (comment) was implemented in CL 169757. We can't use the String() method on non-string JavaScript types as a fmt.Sprint shortcut anymore.

/cc @neelance @bradfitz @gabbifish

Activity

added
NeedsFixThe path to resolution is known, but the work has not been done.
arch-wasmWebAssembly issues
on Apr 29, 2019
added this to the Go1.13 milestone on Apr 29, 2019
self-assigned this
on Apr 29, 2019
gopherbot

gopherbot commented on Apr 29, 2019

@gopherbot
Contributor

Change https://golang.org/cl/174218 mentions this issue: net/http: remove "number:" from Response.Status string

added a commit that references this issue on May 16, 2019
3b699ee
locked and limited conversation to collaborators on Apr 28, 2020
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

        @dmitshur@gopherbot

        Issue actions

          net/http: Response.Status text include "number:" prefix in WebAssembly · Issue #31736 · golang/go