Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: content-encoding=gzip has not been deleted on wasmjs #63139

Closed
0x5457 opened this issue Sep 21, 2023 · 2 comments
Closed

net/http: content-encoding=gzip has not been deleted on wasmjs #63139

0x5457 opened this issue Sep 21, 2023 · 2 comments
Labels
arch-wasm WebAssembly issues NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@0x5457
Copy link

0x5457 commented Sep 21, 2023

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

$ go version
go version go1.21.0 darwin/arm64

Does this issue reproduce with the latest release?

yes

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

go env Output
$ go env
GOARCH='arm64'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOARCH='arm64'
GOVERSION='go1.21.1'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='0'

What did you do?

Introduction: When HTTP requests a gzip API in wasm-js, the response body has been decompressed, but content-encoding=gzip has not been deleted. This is inconsistent with the native behavior.

I created a github repository containing complete reproduction steps

What did you expect to see?

Expect the response of the HTTP client to be automatically decoded into gzip and remove the header with content encoding=gzip

Content-Encoding:
Content-Length:
ContentLength: -1
body: [104 101 108 108 111 44 32 119 111 114 108 100] # decompressed body

What did you see instead?

Content-Encoding: gzip
Content-Length: 36
ContentLength: 36
body: [104 101 108 108 111 44 32 119 111 114 108 100] # decompressed body

@0x5457 0x5457 changed the title net/http: net/http: content-encoding=gzip has not been deleted on wasmjs Sep 21, 2023
@gopherbot
Copy link

Change https://go.dev/cl/530155 mentions this issue: net/http: remove Content-Encoding header in roundtrip_js

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. arch-wasm WebAssembly issues labels Sep 21, 2023
@bcmills bcmills added this to the Backlog milestone Sep 21, 2023
@dmitshur
Copy link
Contributor

dmitshur commented Oct 9, 2023

CC @golang/js, @golang/wasm.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Nov 6, 2023
@dmitshur dmitshur modified the milestones: Backlog, Go1.22 Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly issues NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants