Skip to content

[bug] net/http: "read: connection reset by peer" when using https #73458

@fanybook

Description

@fanybook

Go version

go version go1.22.8 linux/amd64

Output of go env in your module/workspace:

{
        "AR": "ar",
        "CC": "gcc",
        "CGO_CFLAGS": "-O2 -g",
        "CGO_CPPFLAGS": "",
        "CGO_CXXFLAGS": "-O2 -g",
        "CGO_ENABLED": "1",
        "CGO_FFLAGS": "-O2 -g",
        "CGO_LDFLAGS": "-O2 -g",
        "CXX": "g++",
        "GCCGO": "gccgo",
        "GO111MODULE": "on",
        "GOAMD64": "v1",
        "GOARCH": "amd64",
        "GOBIN": "",
        "GOCACHE": "/home/fanybook/.cache/go-build",
        "GOENV": "/home/fanybook/.config/go/env",
        "GOEXE": "",
        "GOEXPERIMENT": "",
        "GOFLAGS": "",
        "GOGCCFLAGS": "-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build160955960=/tmp/go-build -gno-record-gcc-switches",
        "GOHOSTARCH": "amd64",
        "GOHOSTOS": "linux",
        "GOINSECURE": "",
        "GOMOD": "/home/fanybook/_D/workspace-gitee/fanybook/letsgo-next/go.mod",
        "GOMODCACHE": "/home/fanybook/go/pkg/mod",
        "GONOPROXY": "",
        "GONOSUMDB": "",
        "GOOS": "linux",
        "GOPATH": "/home/fanybook/go",
        "GOPRIVATE": "",
        "GOPROXY": "https://goproxy.cn,direct",
        "GOROOT": "/usr/local/go",
        "GOSUMDB": "sum.golang.org",
        "GOTMPDIR": "",
        "GOTOOLCHAIN": "auto",
        "GOTOOLDIR": "/usr/local/go/pkg/tool/linux_amd64",
        "GOVCS": "",
        "GOVERSION": "go1.22.8",
        "GOWORK": "",
        "PKG_CONFIG": "pkg-config"
}

What did you do?

i attempt request a long url via https protocol,it ok in postman, curl and fasthttp

But there is a 90+% chance that it will fail via net/http.Get,100% successful via http protocol

If it is the same URL with shorter parameters, it can be 100% successful

@see: #73394

What did you see happen?

my issue is closed hastily

What did you expect to see?

I hope that take this issue seriously and test it with my code
Instead of casually closing the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions