mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 03:05:29 -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 (
|
) else (
|
||||||
try
|
try
|
||||||
let mime_type =
|
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" ]
|
[ "Content-Type", "text/css" ]
|
||||||
else if Filename.extension path = ".js" then
|
else if Filename.extension path = ".js" then
|
||||||
[ "Content-Type", "text/javascript" ]
|
[ "Content-Type", "text/javascript" ]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue