log not found paths and forbidden methods

This commit is contained in:
2026-08-16 16:35:09 +01:00
parent 5f495d2744
commit 22962e0df8
+2 -2
View File
@@ -66,13 +66,13 @@ async fn process_socket(mut socket: BufStream<TcpStream>, urlmap: Arc<HashMap<St
let path = normalise_path(path);
if http_method != "GET" {
println!("process_request: forbidden method");
println!("process_request: forbidden method: http_method={http_method}");
simple_response(socket, ResponseCode::Forbidden).await;
return;
}
let Some(location) = urlmap.get(&path) else {
println!("process_request: not found");
println!("process_request: not found: location={path}");
simple_response(socket, ResponseCode::NotFound).await;
return;
};