Skip to content

net/http: Transport returns chunked Response with ContentLength 0 [js/wasm] #49108

Closed
@bradfitz

Description

@bradfitz

http.Response.ContentLength should be -1 on a chunked streaming response body without a Content-Length header.

But with js/wasm, it's currently set to 0:

https://github.com/golang/go/blob/master/src/net/http/roundtrip_js.go#L133-L143

/cc @neild @johanbrandhorst

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

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions