diff options
Diffstat (limited to 'src/router.rs')
| -rw-r--r-- | src/router.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/router.rs b/src/router.rs index 40dac61..d999a32 100644 --- a/src/router.rs +++ b/src/router.rs @@ -413,14 +413,14 @@ impl Router { } } + if url.path().is_empty() { + url.set_path("/"); + } + let fixed_path = if self.fix_path { self .routes - .fix_path(if url.path().is_empty() { - "/" - } else { - url.path() - }) + .fix_path(url.path()) .unwrap_or_else(|| url.path().to_string()) } else { url.path().to_string() |