From 41108ceee6f01e7fe1fd3dbbc5dd223306e40fa6 Mon Sep 17 00:00:00 2001 From: Chrislearn Young Date: Tue, 1 Oct 2024 22:24:48 +0800 Subject: [PATCH] wip --- crates/core/src/fs/named_file.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/core/src/fs/named_file.rs b/crates/core/src/fs/named_file.rs index 1aa51f09f..1097d0ffb 100644 --- a/crates/core/src/fs/named_file.rs +++ b/crates/core/src/fs/named_file.rs @@ -468,10 +468,8 @@ impl NamedFile { } } } - if !res.headers().contains_key(CONTENT_TYPE) { - res.headers_mut() - .insert(CONTENT_TYPE, self.content_type.clone()); - } + res.headers_mut() + .insert(CONTENT_TYPE, self.content_type.clone()); if let Some(lm) = last_modified { res.headers_mut().typed_insert(LastModified::from(lm)); }