Echo/reply working
This commit is contained in:
@ -5,7 +5,6 @@ pub fn connection_handler(client: &mut http::HttpStream, req: &http::Request) {
|
||||
let mut res = http::Response::new();
|
||||
|
||||
if let http::Method::GET = req.method {
|
||||
res.status(501);
|
||||
} else {
|
||||
res.status(405);
|
||||
res.add_header("Allow", "GET");
|
||||
@ -13,5 +12,7 @@ pub fn connection_handler(client: &mut http::HttpStream, req: &http::Request) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO implement websocket
|
||||
res.status(501);
|
||||
res.send(&mut client.stream);
|
||||
}
|
||||
|
Reference in New Issue
Block a user