Merge pull request #5 from calcu1on/better-404
better handlign of something.
This commit is contained in:
commit
d1ac420503
@ -51,6 +51,8 @@ fn handle_connection(mut stream: TcpStream) {
|
|||||||
keyfile[0].pop().expect("Not a string").to_string();
|
keyfile[0].pop().expect("Not a string").to_string();
|
||||||
if api_key == keyfile[0] {
|
if api_key == keyfile[0] {
|
||||||
response = return_response("200");
|
response = return_response("200");
|
||||||
|
} else {
|
||||||
|
response = return_response("404");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stream.write_all(response.as_bytes()).unwrap();
|
stream.write_all(response.as_bytes()).unwrap();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user