Skip to content

Commit 64df861

Browse files
committed
style: fix example
1 parent 53cf1fb commit 64df861

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/examples/echo.ml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ let () =
2323
in
2424
let ic = open_in path in
2525
let str = S.Byte_stream.of_chan ic in
26-
let mime_type =
27-
try
28-
let p = Unix.open_process_in (Printf.sprintf "file -i -b %S" path) in
29-
try
30-
let s = ["Content-Type", String.trim (input_line p)] in
31-
ignore @@ Unix.close_process_in p;
32-
s
33-
with _ -> ignore @@ Unix.close_process_in p; []
34-
with _ -> []
35-
in
36-
S.Response.make_stream ~headers:mime_type (Ok str)
26+
let mime_type =
27+
try
28+
let p = Unix.open_process_in (Printf.sprintf "file -i -b %S" path) in
29+
try
30+
let s = ["Content-Type", String.trim (input_line p)] in
31+
ignore @@ Unix.close_process_in p;
32+
s
33+
with _ -> ignore @@ Unix.close_process_in p; []
34+
with _ -> []
35+
in
36+
S.Response.make_stream ~headers:mime_type (Ok str)
3737
);
3838
(* echo request *)
3939
S.add_path_handler server

0 commit comments

Comments
 (0)