Remove debug print statements.
This commit is contained in:
parent
736c1e6546
commit
9f28bcdb84
1 changed files with 0 additions and 5 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue