refactor: improve resolve_path and handle_assets, abandon guard_path (#360)

This commit is contained in:
sigoden
2024-02-07 16:27:22 +08:00
committed by GitHub
parent 015713bc6d
commit 920b70abc4
4 changed files with 60 additions and 50 deletions

View File

@@ -53,7 +53,7 @@ fn path_prefix_single_file(tmpdir: TempDir, port: u16, #[case] file: &str) -> Re
let resp = reqwest::blocking::get(format!("http://localhost:{port}/xyz/index.html"))?;
assert_eq!(resp.text()?, "This is index.html");
let resp = reqwest::blocking::get(format!("http://localhost:{port}"))?;
assert_eq!(resp.status(), 403);
assert_eq!(resp.status(), 400);
child.kill()?;
Ok(())