From 29956d09fde4351b99e24f6cad37199810fe9670 Mon Sep 17 00:00:00 2001 From: RobIux <61161436+RobIux@users.noreply.github.com> Date: Tue, 4 Jun 2024 19:36:22 +0200 Subject: [PATCH] Update html.rs --- napture/src/b9/html.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/napture/src/b9/html.rs b/napture/src/b9/html.rs index e40b2300..1bc2219f 100644 --- a/napture/src/b9/html.rs +++ b/napture/src/b9/html.rs @@ -37,10 +37,10 @@ async fn parse_html(mut url: String) -> Result<(Node, Node)> { .unwrap_or("").to_string() }; if let Ok(mut segments) = uri.path_segments_mut() { - if !last_seg.contains(".") { + if last_seg == "" { segments.pop_if_empty(); segments.push("index.html"); - } else { + } else if last_seg.contains(".") { if !last_seg.ends_with(".html") { is_html = false; }