From 21c8402004d0c6f362496e837d0b38c35174f1c8 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 27 Jun 2025 08:03:45 +0300 Subject: [PATCH] register the event to continue the local redirection --- .../window/tab/item/client/driver/nex.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app/browser/window/tab/item/client/driver/nex.rs b/src/app/browser/window/tab/item/client/driver/nex.rs index 82bdc95c..809f909e 100644 --- a/src/app/browser/window/tab/item/client/driver/nex.rs +++ b/src/app/browser/window/tab/item/client/driver/nex.rs @@ -42,16 +42,17 @@ impl Nex { let path = uri.path(); // copy once if path.is_empty() { + // auto-append trailing slash to the root locations let mut r = uri.to_string(); - r.push('/'); // auto-append trailing slash to the root locations - self.page.navigation.request.info.replace( - self.page - .navigation - .request - .info - .take() - .into_permanent_redirect(), - ); + r.push('/'); + // apply the permanent redirection + let mut i = self.page.navigation.request.info.take(); + i.add_event("Canonicalize root request".to_string()); + self.page + .navigation + .request + .info + .replace(i.into_permanent_redirect()); self.page.navigation.set_request(&r); self.page.item_action.load.activate(Some(&r), false, true); }