1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Merge pull request #428 from Unrud/patch-22

Add timeout to connections, limit size of request body and limit number of parallel connections
This commit is contained in:
Guillaume Ayoub 2016-07-14 02:06:24 +02:00 committed by GitHub
commit ef63865e31
4 changed files with 65 additions and 18 deletions

View file

@ -175,6 +175,9 @@ def serve(configuration, logger):
name, filename, exception))
else:
server_class = ThreadedHTTPServer
server_class.client_timeout = configuration.getint("server", "timeout")
server_class.max_connections = configuration.getint("server",
"max_connections")
if not configuration.getboolean("server", "dns_lookup"):
RequestHandler.address_string = lambda self: self.client_address[0]