net/http,x/net/http2: http2serverConn WriteTimeout cannot set negative values #65785
Labels
FixPending
Issues that have a fix which has not yet been reviewed or submitted.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Go version
go version go1.21.3 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Set http.Server WriteTimeout to negative value.
Comment in http.Server:
// A zero or negative value means there will be no timeout.
What did you see happen?
Using golang h2 client request shows error.
If you use the current version of chrome to access,
ERR_HTTP2_PROTOCOL_ERROR
is displayed.What did you expect to see?
h2 server handles negative WriteTimeouts normally.
In the current go version,
http.Server
andhttp.http2serverConn
set WriteTimeout judgment conditions differently.The text was updated successfully, but these errors were encountered: