Update src/server/http.rs
This commit is contained in:
parent
bbe9322c94
commit
05bf2b7294
@ -186,6 +186,10 @@ fn get_content_type(file_path: &str) -> &'static str {
|
||||
"audio/mpeg"
|
||||
} else if file_path.ends_with(".mp4") {
|
||||
"video/mp4"
|
||||
} else if file_path.ends_with(".pdf") {
|
||||
"application/pdf"
|
||||
} else if file_path.ends_with(".md") {
|
||||
"text/markdown"
|
||||
} else {
|
||||
"text/plain"
|
||||
}
|
||||
@ -354,4 +358,4 @@ fn log_to_file(message: &str) {
|
||||
let log_message = format!("[{}] {}\n", timestamp, message);
|
||||
let _ = file.write_all(log_message.as_bytes());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user