stuff
This commit is contained in:
parent
20d9d9d91c
commit
ad7d1eb7a8
|
@ -239,9 +239,9 @@ fn handle_connection(mut stream: TcpStream) {
|
||||||
}
|
}
|
||||||
Err(e) =>
|
Err(e) =>
|
||||||
match e.kind() {
|
match e.kind() {
|
||||||
io::ErrorKind::NotFound => format!("HTTP/1.1 404\r\n\r\n{:?} not found", path.to_str()),
|
io::ErrorKind::NotFound => format!("HTTP/1.1 404\r\n\r\n{:?} not found", req.file().unwrap().to_str()),
|
||||||
io::ErrorKind::PermissionDenied => format!("HTTP/1.1 403\r\n\r\n{:?} not readable", path.to_str()),
|
io::ErrorKind::PermissionDenied => format!("HTTP/1.1 403\r\n\r\n{:?} not readable", req.file().unwrap().to_str()),
|
||||||
io::ErrorKind::FileTooLarge => format!("HTTP/1.1 413\r\n\r\n{:?} was too large", path.to_str()),
|
io::ErrorKind::FileTooLarge => format!("HTTP/1.1 413\r\n\r\n{:?} was too large", req.file().unwrap().to_str()),
|
||||||
_ => format!("HTTP/1.1 500{0}{0}{e}", CLRF),
|
_ => format!("HTTP/1.1 500{0}{0}{e}", CLRF),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue