From 56ee1445bf81b83ff026de0537cb2d824e0c8b4d Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 7 Nov 2017 05:11:33 +0100 Subject: 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. --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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) ) }); } -- cgit v1.2.3