acme: socket timeout for HTTP standalone servers (#7388)

* acme: socket timeout for HTTP standalone servers

Adds a default 30 second timeout to the StreamRequestHandler for clients
connecting to standalone HTTP-01 servers. This should prevent most cases
of an idle client connection from preventing the standalone server from
shutting down.

Fixes #7386

* use idiomatic kwargs default value

* move HTTP01Server lower to fix mypy forward ref.

* fix test crash on macOS due to socket double-close

* maybe its not an OSError?

* disable coverage check on useless branch
This commit is contained in:
alexzorin
2020-04-01 23:53:58 +02:00
committed by GitHub
parent bc3088121b
commit 4ca86d9482
3 changed files with 30 additions and 4 deletions
+2
View File
@@ -26,6 +26,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
* Fix nginx plugin crash when non-ASCII configuration file is being read (instead,
the user will be warned that UTF-8 must be used).
* Fix hanging OCSP queries during revocation checking - added a 10 second timeout.
* Standalone servers now have a default socket timeout of 30 seconds, fixing
cases where an idle connection can cause the standalone plugin to hang.
More details about these changes can be found on our GitHub repo.