mirror of https://github.com/vinc/moros.git
Fix HTTP server content type (#608)
This commit is contained in:
parent
3862a01513
commit
6ab9ad713b
|
@ -221,7 +221,7 @@ fn get(req: &Request, res: &mut Response) {
|
|||
}
|
||||
if let Ok(buf) = fs::read_to_bytes(&real_path) {
|
||||
res.code = 200;
|
||||
res.mime = content_type(&res.real_path);
|
||||
res.mime = content_type(&real_path);
|
||||
let tmp;
|
||||
res.body.extend_from_slice(
|
||||
if res.mime.starts_with("text/") {
|
||||
|
|
Loading…
Reference in New Issue