aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-11-07 05:11:33 +0100
committerTeddy Wing2017-11-07 05:11:33 +0100
commit56ee1445bf81b83ff026de0537cb2d824e0c8b4d (patch)
tree97095b3d4dcb49f9e0783e44a5e9498347316919
parent2f235fe9eb1e39db6d0d18818e89b63edf4e1b7b (diff)
downloadkipper-56ee1445bf81b83ff026de0537cb2d824e0c8b4d.tar.bz2
main.rs: Print message on 404
Print a simple text message on 404 for human consumption. Makes it more obvious than finding out the response status code in a browser.
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index d5f89ca..e9c50e4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -9,7 +9,8 @@ fn main() {
rouille::Response::text("hello world")
},
- _ => rouille::Response::empty_404()
+ _ => rouille::Response::text("404 Not Found")
+ .with_status_code(404)
)
});
}