Remove debug print statements.

This commit is contained in:
abbie 2021-12-26 17:31:46 +00:00
parent 736c1e6546
commit 9f28bcdb84
No known key found for this signature in database
GPG key ID: 04DDE463F9200F87

View file

@ -17,7 +17,6 @@ fn process_cgi(filename: String) -> String {
let vars1 = vars + 1;
query = &filename[vars1..];
script = &filename[..vars];
println!("{} {}", query, script);
} else {
query = "";
script = &filename;
@ -138,11 +137,9 @@ fn get_page(filename: String) -> String {
if checks == true && index == false {
if path.contains(".") != true && path.contains(".cgi?") != true {
let result = generate_index(filename);
println!("balls");
return result.to_string();
} else if path.contains(".cgi?") {
let result = process_cgi(filename);
println!("quack");
return result.to_string();
}
}
@ -155,11 +152,9 @@ fn get_page(filename: String) -> String {
return result.to_string();
} else if filename.contains(".cgi") {
let result = process_cgi(filename);
println!("cheese");
return result.to_string();
} else {
let result = fs::read_to_string(filename);
println!("e");
match result {
Ok(i) => i.to_string(),
Err(_e) => "<!DOCTYPE HTML><html><body><h1>403 Forbidden</h1><p>The resource you are trying to access cannot be read by the server.</p></body></html>".to_string(),