From cbb5a444d55a2d68f2070cf68263792e4b332fa6 Mon Sep 17 00:00:00 2001 From: mtgmonkey Date: Thu, 19 Jun 2025 06:41:31 -0400 Subject: [PATCH] add http/2 --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1654c83..a1cedd8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,7 +52,7 @@ fn parse_connection_to_header(stream: &TcpStream) -> Result Result { - let regex = Regex::new(r"GET /(?[^/].*|) HTTP/1\.1").unwrap(); + let regex = Regex::new(r"GET /(?[^/].*|) HTTP/(1\.1|2)").unwrap(); match regex.captures(&request) { Some(captures) => Ok(captures["path"].to_string()), None => Err(HTTP_400_BAD_REQUEST),