You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The http.Server struct contains ReadTimeout and WriteTimeout, but those are set right
after the connection is accepted and are not reset on subsequent requests on that
connection.
An http.Handler is not privy to the number of requests sent over a connection nor the
duration since the connection was created, so it cannot set the "Connection:
close" header based on this information.
Ideally, an idle-timeout on the connection could be established as well as read and
write deadlines for individual requests.
As it stands now, one must choose between these options:
1. keep-alives with a deadline which could mean the connection will be closed
mid-response, in violation of the recommendation in rfc2616 sec 8.1.4.
2. Disable keep-alive, which is undesirable with TLS.
The text was updated successfully, but these errors were encountered:
Also ran into this issue. I also noticed that setting WriteTimeout without setting
ReadTimeout doesn't work (or at least, doesn't do anything useful that I can see).
by patrick.allen.higgins:
The text was updated successfully, but these errors were encountered: