From b0ce533bde8d48557d336b1e9d7d7841b9c9e430 Mon Sep 17 00:00:00 2001 From: xfy Date: Sat, 21 Jun 2025 12:32:37 +0800 Subject: [PATCH] fix: list directory size --- src/http/serve.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/http/serve.rs b/src/http/serve.rs index a668308..aa62061 100644 --- a/src/http/serve.rs +++ b/src/http/serve.rs @@ -241,15 +241,6 @@ async fn stream_file( } } } - // if let Some(if_none_match) = request.headers().get(IF_NONE_MATCH) - // && if_none_match - // .to_str() - // .with_context(|| "parse if-none-match failed")? - // == etag - // { - // response = response.status(StatusCode::NOT_MODIFIED); - // not_modified = true; - // }; let stream = if not_modified { let empty = File::open(PathBuf::from("/dev/null")) @@ -352,8 +343,8 @@ fn render_list_html(list: Vec) -> String { r#"{}{}{}"#, dist.path.display(), dist.name, - dist.size, dist.last_modified, + dist.size, // dist.is_dir ) })