We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
go version go1.22.2 linux/amd64
go env
GO111MODULE='' GOARCH='amd64' GOBIN='' GOCACHE='/home/aidan/.cache/go-build' GOENV='/home/aidan/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='' GOMODCACHE='/home/aidan/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='linux' GOPATH='/home/aidan/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/snap/go/10585' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/snap/go/10585/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.22.2' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='gcc' CXX='g++' CGO_ENABLED='1' GOMOD='/home/aidan/test/go.mod' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3513958785=/tmp/go-build -gno-record-gcc-switches'
package main import ( "fmt" "io" "net/http" ) func main() { originalTransport := &http.Transport{} clonedTransport := originalTransport.Clone() clonedClient := &http.Client{ Transport: clonedTransport, } clonedResp, err := clonedClient.Get("https://api.ipify.org") if err == nil { clonedBodyBuf, _ := io.ReadAll(clonedResp.Body) clonedResp.Body.Close() fmt.Println("Cloned: ", string(clonedBodyBuf)) } else { fmt.Println(err.Error()) } }
Get "https://api.ipify.org": net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x00\x00\x12\x04\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00d\x00\x04\x00\x01\x00\x00\x00\x05\x00\xff\xff\xff\x00\x00\x04\b\x00\x00\x00\x00\x00\x7f\xff\x00\x00\x00\x00\b\a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"
Cloned: [IP Address]
The text was updated successfully, but these errors were encountered:
Also, this bug itself seems to be the root cause for #39302, so maybe renaming that issue would be useful if this will be closed as a duplicate.
Sorry, something went wrong.
Duplicate of #39302
No branches or pull requests
Go version
go version go1.22.2 linux/amd64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
What did you expect to see?
The text was updated successfully, but these errors were encountered: