In http 1.1 persistent connection protocol there is a
timing race where the client sends the request and then
the server kills the connection (due to inactivity)
before receiving the client's request.
By providing a keep-alive header it is possible to provide
the client a hint of when idle timeout would occur and
avoid the race.
Fixes: https://github.com/nodejs/node/issues/34560
PR-URL: https://github.com/nodejs/node/pull/34561
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com>