improv: #5 handle the request and return a response (useful for tests)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user