feat: serve single file (#54)

close #53
This commit is contained in:
sigoden
2022-06-19 14:23:10 +08:00
committed by GitHub
parent 9c2e9d1503
commit c3ac2a21c9
6 changed files with 56 additions and 11 deletions

View File

@@ -105,6 +105,7 @@ fn head_file(server: TestServer) -> Result<(), Error> {
assert_eq!(resp.status(), 200);
assert_eq!(resp.headers().get("content-type").unwrap(), "text/html");
assert_eq!(resp.headers().get("accept-ranges").unwrap(), "bytes");
assert!(resp.headers().contains_key("content-disposition"));
assert!(resp.headers().contains_key("etag"));
assert!(resp.headers().contains_key("last-modified"));
assert!(resp.headers().contains_key("content-length"));