From 30342e681c6db184ebca5aa2c30ee8bb7f60470d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 11 Sep 2021 11:36:22 +0200 Subject: [PATCH] =?utf8?q?simple-http:=20Na=C3=AFve=20unlimited=20threads?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This introduces a DoS with too many parallel requests. --- simple-http/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simple-http/src/main.rs b/simple-http/src/main.rs index d2d0f88..0993075 100644 --- a/simple-http/src/main.rs +++ b/simple-http/src/main.rs @@ -64,6 +64,6 @@ fn main() { for stream in listener.incoming() { let stream = stream.unwrap(); - handle_connection(stream); + thread::spawn(|| handle_connection(stream)); } } -- 2.39.5