diff options
| author | Fuwn <[email protected]> | 2023-05-17 02:15:08 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-05-17 02:15:08 -0700 |
| commit | fe1ec97079a13f934dbec53ea443e52ba81d2566 (patch) | |
| tree | 92d8fc25589eebee76ba677bc72b8145381493b4 /src/route.rs | |
| parent | deps(windmark): bump to 0.3.9 (diff) | |
| download | locus-fe1ec97079a13f934dbec53ea443e52ba81d2566.tar.xz locus-fe1ec97079a13f934dbec53ea443e52ba81d2566.zip | |
fix(route): fill for root path
Diffstat (limited to 'src/route.rs')
| -rw-r--r-- | src/route.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/route.rs b/src/route.rs index 7237fec..a983374 100644 --- a/src/route.rs +++ b/src/route.rs @@ -91,6 +91,14 @@ pub fn cache(context: &RouteContext, response: &str) { ); } - trace!("recache for {}", context.url.path()); + trace!("recache for {}", { + let path = context.url.path(); + + if path.is_empty() { + "/" + } else { + path + } + }); } } |