diff options
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs index 31c7aa9..a6c16d9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -92,6 +92,10 @@ pub fn serve(archive: &'static str) -> Server { let mut current = Some(Archive::new(archive.clone())); let mut response = None; for part in path_parts { + // normalize foo//bar == foo/bar + if part.is_empty() { + continue + } if response.is_some() { // didn't run out of path_parts but somehow we // found a valid response. invalidate it. |