Commit b6ad2880 authored by Agniva De Sarker's avatar Agniva De Sarker Committed by Agniva De Sarker
Browse files

net/http: avoid setting body when NoBody is set for js/wasm

When http.NoBody is set, it is equivalent to Body being zero bytes.
We therefore set the body only if it is of length greater than 0.

Manually verified with wasmbrowsertest.

Fixes #36339

Change-Id: I9c108c38f99409f72ea101819af572429505a8ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/237758


Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarJohan Brandhorst <johan.brandhorst@gmail.com>
Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
parent ccc95163
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment