File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 11module S = Tiny_httpd
2- module U = Tiny_httpd. Util
32module D = Tiny_httpd. Dir
4- module Pf = Printf
53module Log = Tiny_httpd. Log
64
75let serve ~config ~timeout (dir : string ) addr port j : _ result =
86 let server = S. create ~max_connections: j ~addr ~port ~timeout () in
97 let after_init () =
108 Printf. printf " serve directory %s on http://%(%s%):%d\n %!" dir
119 (if S. is_ipv6 server then
12- " [%s]"
13- else
14- " %s" )
10+ " [%s]"
11+ else
12+ " %s" )
1513 addr (S. port server)
1614 in
1715
@@ -63,9 +61,9 @@ let main () =
6361 (fun b ->
6462 config.dir_behavior < -
6563 (if b then
66- Index_or_lists
67- else
68- Lists )),
64+ Index_or_lists
65+ else
66+ Lists )),
6967 " <bool> automatically redirect to index.html if present" );
7068 ( " --delete" ,
7169 Unit (fun () -> config.delete < - true ),
You can’t perform that action at this time.
0 commit comments