Correction 404

This commit is contained in:
Justine 2023-01-10 09:37:56 +01:00
parent fe9e6f04f5
commit 773ae9841a
8 changed files with 1 additions and 39 deletions

View File

@ -1 +0,0 @@
Hello

View File

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello!</title>
</head>
<body>
<h1>Oops!</h1>
<p>Sorry, I don't know what you're asking for. No crabs here.</p>
</body>
</html>

View File

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hi!</title>
</head>
<body>
<h1>Hello</h1>
<img src="pictures/ferris.jpg" alt="Ferris" style="width:200px;">
<p>Hi from Rust</p>
<a href="/test/crabe">NSFW ?</a>
<img src="pictures/modes.png" alt="Mode" style="width:200px;">
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

View File

@ -1,12 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Naughty!</title>
</head>
<body>
<h1>NSFW</h1>
<p>Hi from Rust</p>
<img src="../pictures/bondage.jpg" style="width:400px;">
</body>
</html>

View File

@ -245,7 +245,7 @@ pub mod websrv {
c c
}, },
None => { None => {
fs::read("./html/err_pages/404.html").unwrap_or(String::from("404 NOT FOUND GET LOST").as_bytes().to_vec()) fs::read(format!("{root_folder}/err_pages/404.html")).unwrap_or(String::from("404 NOT FOUND GET LOST").as_bytes().to_vec())
}, },
}; };