mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-05 19:00:32 -05:00
dir: handle html
This commit is contained in:
parent
6cfd1975d1
commit
384515a594
1 changed files with 4 additions and 1 deletions
|
|
@ -310,7 +310,10 @@ let add_vfs_ ~on_fs ~top ~config ~vfs:((module VFS : VFS) as vfs) ~prefix server
|
|||
) else (
|
||||
try
|
||||
let mime_type =
|
||||
if Filename.extension path = ".css" then
|
||||
(* FIXME: handle .html specially *)
|
||||
if Filename.extension path = ".html" then
|
||||
[ "Content-Type", "text/html" ]
|
||||
else if Filename.extension path = ".css" then
|
||||
[ "Content-Type", "text/css" ]
|
||||
else if Filename.extension path = ".js" then
|
||||
[ "Content-Type", "text/javascript" ]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue