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),