File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments