diff options
author | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-05-02 19:44:06 +0000 |
---|---|---|
committer | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-05-02 19:44:06 +0000 |
commit | c461a1d0149317e7086e2fb6b128618fcec11262 (patch) | |
tree | a9516fcf76949f7980cdaf731d2ea4898ee8d036 | |
parent | Read query params to handle error back link (diff) | |
download | miniserve-c461a1d0149317e7086e2fb6b128618fcec11262.tar.gz miniserve-c461a1d0149317e7086e2fb6b128618fcec11262.zip |
Display path instead of uri in 404 error
Diffstat (limited to '')
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 3bac14d..5c0edb7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -280,7 +280,7 @@ fn configure_app(app: App<MiniserveConfig>) -> App<MiniserveConfig> { } fn error_404(req: &HttpRequest<crate::MiniserveConfig>) -> Result<HttpResponse, io::Error> { - let err_404 = ContextualError::RouteNotFoundError(req.uri().to_string()); + let err_404 = ContextualError::RouteNotFoundError(req.path().to_string()); let default_color_scheme = req.state().default_color_scheme; let return_address = match &req.state().random_route { Some(random_route) => format!("/{}", random_route), |