mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
fix warnings
This commit is contained in:
parent
e177153f10
commit
75d90559bd
1 changed files with 6 additions and 8 deletions
|
|
@ -1,7 +1,5 @@
|
||||||
module S = Tiny_httpd
|
module S = Tiny_httpd
|
||||||
module U = Tiny_httpd.Util
|
|
||||||
module D = Tiny_httpd.Dir
|
module D = Tiny_httpd.Dir
|
||||||
module Pf = Printf
|
|
||||||
module Log = Tiny_httpd.Log
|
module Log = Tiny_httpd.Log
|
||||||
|
|
||||||
let serve ~config ~timeout (dir : string) addr port j : _ result =
|
let serve ~config ~timeout (dir : string) addr port j : _ result =
|
||||||
|
|
@ -9,9 +7,9 @@ let serve ~config ~timeout (dir : string) addr port j : _ result =
|
||||||
let after_init () =
|
let after_init () =
|
||||||
Printf.printf "serve directory %s on http://%(%s%):%d\n%!" dir
|
Printf.printf "serve directory %s on http://%(%s%):%d\n%!" dir
|
||||||
(if S.is_ipv6 server then
|
(if S.is_ipv6 server then
|
||||||
"[%s]"
|
"[%s]"
|
||||||
else
|
else
|
||||||
"%s")
|
"%s")
|
||||||
addr (S.port server)
|
addr (S.port server)
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
@ -63,9 +61,9 @@ let main () =
|
||||||
(fun b ->
|
(fun b ->
|
||||||
config.dir_behavior <-
|
config.dir_behavior <-
|
||||||
(if b then
|
(if b then
|
||||||
Index_or_lists
|
Index_or_lists
|
||||||
else
|
else
|
||||||
Lists)),
|
Lists)),
|
||||||
" <bool> automatically redirect to index.html if present" );
|
" <bool> automatically redirect to index.html if present" );
|
||||||
( "--delete",
|
( "--delete",
|
||||||
Unit (fun () -> config.delete <- true),
|
Unit (fun () -> config.delete <- true),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue