improv: #5 handle the request and return a response (useful for tests)

This commit is contained in:
2022-09-19 10:51:30 +01:00
parent 0a76efdc64
commit 617c084782
2 changed files with 18 additions and 9 deletions
+2 -2
View File
@@ -122,7 +122,7 @@ impl HTTPStartLine {
HTTP_VERSION_REGEX.is_match(version)
}
fn is_valid(&self) -> bool {
pub fn is_valid(&self) -> bool {
return self.method != "" && self.target != "";
}
}
@@ -234,7 +234,7 @@ impl HTTPRequest {
}
}
fn is_valid(&self) -> bool {
pub fn is_valid(&self) -> bool {
return self.start_line.is_valid();
}
}