From fa0c2865366b1bb65a2977c4b9608c9a92fc5889 Mon Sep 17 00:00:00 2001 From: boastful-squirrel Date: Wed, 1 May 2019 18:23:29 +0200 Subject: Use HTTP StatusCode for error title --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index f0c23cc..46f22c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ #![feature(proc_macro_hygiene)] -use actix_web::http::Method; +use actix_web::http::{Method, StatusCode}; use actix_web::{fs, middleware, server, App, HttpRequest, HttpResponse}; use clap::crate_version; use simplelog::{Config, LevelFilter, TermLogger}; @@ -284,7 +284,7 @@ fn p404(req: &HttpRequest) -> Result format!("/{}", random_route), - None => req.path().to_string(), + None => "/".to_string(), }; errors::log_error_chain(err_404.to_string()); @@ -292,6 +292,7 @@ fn p404(req: &HttpRequest) -> Result