-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http: http2 close request body and read it again #59426
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
Comments
CC @neild |
Go 1.18 is not a supported version of Go. Does this reproduce with newer releases? |
The
The |
@neild Thanks for your answer. Does it mean that once |
Any data returned by That is, if |
The explanation was very clear, thanks a lot. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
not try
What operating system and processor architecture are you using (
go env
)?go env
OutputGO111MODULE=""
GOARCH="amd64"
GOBIN="/home/gopath/bin"
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/gopath"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build112645457=/tmp/go-build -gno-record-gcc-switches"
What did you do?
This situation only occurs with a small probability when a large number of requests are made quickly, and it may occur even if there are no concurrent requests.
What did you expect to see?
newClientConn
close the request body, but.(*http2ClientConn).RoundTrip
read the request body again.What did you see instead?
do not close the request body if need read it again.
The text was updated successfully, but these errors were encountered: