net/http: misleading description of Transport.DisableKeepAlives field #26128
Labels
Documentation
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
http.Transport struct has DisableKeepAlives field and its description says it's related to TCP connection re-use like TCP Keep-alive.
But it's actually related to HTTP Keep-alive not TCP Keep-alive. I've found that if it is set to true, then HTTP request header will have "Connection:Close".
net/http/transport.go around 1997 line.
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
The description about DisableKeepAlive field should be modified. It could make misunderstanding.
What did you see instead?
The text was updated successfully, but these errors were encountered: