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;
|
let vars1 = vars + 1;
|
||||||
query = &filename[vars1..];
|
query = &filename[vars1..];
|
||||||
script = &filename[..vars];
|
script = &filename[..vars];
|
||||||
println!("{} {}", query, script);
|
|
||||||
} else {
|
} else {
|
||||||
query = "";
|
query = "";
|
||||||
script = &filename;
|
script = &filename;
|
||||||
|
@ -138,11 +137,9 @@ fn get_page(filename: String) -> String {
|
||||||
if checks == true && index == false {
|
if checks == true && index == false {
|
||||||
if path.contains(".") != true && path.contains(".cgi?") != true {
|
if path.contains(".") != true && path.contains(".cgi?") != true {
|
||||||
let result = generate_index(filename);
|
let result = generate_index(filename);
|
||||||
println!("balls");
|
|
||||||
return result.to_string();
|
return result.to_string();
|
||||||
} else if path.contains(".cgi?") {
|
} else if path.contains(".cgi?") {
|
||||||
let result = process_cgi(filename);
|
let result = process_cgi(filename);
|
||||||
println!("quack");
|
|
||||||
return result.to_string();
|
return result.to_string();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,11 +152,9 @@ fn get_page(filename: String) -> String {
|
||||||
return result.to_string();
|
return result.to_string();
|
||||||
} else if filename.contains(".cgi") {
|
} else if filename.contains(".cgi") {
|
||||||
let result = process_cgi(filename);
|
let result = process_cgi(filename);
|
||||||
println!("cheese");
|
|
||||||
return result.to_string();
|
return result.to_string();
|
||||||
} else {
|
} else {
|
||||||
let result = fs::read_to_string(filename);
|
let result = fs::read_to_string(filename);
|
||||||
println!("e");
|
|
||||||
match result {
|
match result {
|
||||||
Ok(i) => i.to_string(),
|
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(),
|
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