Skip to content

Commit 32ae4f7

Browse files
authored
Merge pull request #981 from dkalinichenko-js/v2.5-base-compat
v2.5 base v0.16 compat
2 parents a40873a + afdd585 commit 32ae4f7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cohttp-async/bin/cohttp_server_async.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ let serve ~info ~docroot ~index uri path =
5050
serve_file ~docroot ~uri
5151
| `No | `Unknown -> (* Do a directory listing *)
5252
Sys.ls_dir file_name
53-
>>= Deferred.List.map ~f:(fun f ->
53+
>>= Deferred.List.map ~how:`Parallel ~f:(fun f ->
5454
let file_name = file_name / f in
5555
try_with (fun () ->
5656
Unix.stat file_name

cohttp-async/src/body_raw.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ let write_body write_body (body : t) writer =
6666
match body with
6767
| `Empty -> return ()
6868
| `String s -> write_body writer s
69-
| `Strings sl -> Deferred.List.iter sl ~f:(write_body writer)
69+
| `Strings sl -> Deferred.List.iter ~how:`Sequential sl ~f:(write_body writer)
7070
| `Pipe p -> Pipe.iter p ~f:(write_body writer)
7171

7272
let pipe_of_body read_chunk ic =

cohttp-async/src/io.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ open Async_kernel
1919

2020
module Writer = Async_unix.Writer
2121
module Reader = Async_unix.Reader
22-
module Format = Caml.Format
22+
module Format = Stdlib.Format
2323

2424
let log_src_name = "cohttp.async.io"
2525
let src = Logs.Src.create log_src_name ~doc:"Cohttp Async IO module"
@@ -41,7 +41,7 @@ let default_reporter () =
4141
over ();
4242
k () in
4343
msgf @@ fun ?header:_ ?tags:_ fmt ->
44-
Format.kfprintf k fmtr Caml.("@[" ^^ fmt ^^ "@]@.")
44+
Format.kfprintf k fmtr Stdlib.("@[" ^^ fmt ^^ "@]@.")
4545
in
4646
{ Logs.report }
4747

@@ -56,10 +56,10 @@ let set_log = lazy (
5656
)
5757

5858
let check_debug norm_fn debug_fn =
59-
match Caml.Sys.getenv "COHTTP_DEBUG" with
59+
match Stdlib.Sys.getenv "COHTTP_DEBUG" with
6060
| _ ->
6161
Lazy.force set_log; debug_fn
62-
| exception Caml.Not_found -> norm_fn
62+
| exception Stdlib.Not_found -> norm_fn
6363

6464
type 'a t = 'a Deferred.t
6565
let (>>=) = Deferred.(>>=)

0 commit comments

Comments
 (0)