Now only index.gmi (need to fix)

This commit is contained in:
g1n 2021-07-09 09:45:15 +00:00
parent b4031fdbe0
commit 9e478116f8
1 changed files with 5 additions and 2 deletions

View File

@ -75,13 +75,16 @@ fn handle_connection(mut stream: TcpStream) {
let get = format!( "{} {} {}\r\n {}\r\n", host, _path, _post_len, _post);
let get_bytes = get.as_bytes();
let status_line = "2 text/gemini\r\n";
/*
let (status_line, _filename) = if buffer.starts_with(get_bytes) {
("2 text/gemini\r\n", "index.gmi")
} else {
("4 Not found\r\n", "") // TDOD: fix Not Found behaviour
("4 Not found\r\n", "") // TODO: fix Not Found behaviour
};
*/
//let filename = "index.gmi";
/*
let _contents = "";