Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions async/cohttp_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,9 @@ module Server = struct
|Ok res -> return res
|Error exn -> respond_with_string ~code:`Not_found error_body

let create ?max_connections ?max_pending_connections
?buffer_age_limit ?on_handler_error ?(mode=`TCP) where_to_listen handle_request =
Conduit_async.serve ?max_connections ?max_pending_connections
let create ?max_connections ?buffer_age_limit ?on_handler_error
?(mode=`TCP) where_to_listen handle_request =
Conduit_async.serve ?max_connections
?buffer_age_limit ?on_handler_error mode
where_to_listen (handle_client handle_request)
>>| fun server ->
Expand Down
1 change: 0 additions & 1 deletion async/cohttp_async.mli
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ module Server : sig
(** Build a HTTP server, based on the [Tcp.Server] interface *)
val create :
?max_connections:int ->
?max_pending_connections:int ->
?buffer_age_limit: Writer.buffer_age_limit ->
?on_handler_error:[ `Call of 'address -> exn -> unit
| `Ignore
Expand Down
2 changes: 1 addition & 1 deletion bin/cohttp_curl_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let make_net_req uri meth' body () =

let _ =
let open Command.Spec in
Command.async_basic ~summary:"Fetch URL and print it"
Command.async ~summary:"Fetch URL and print it"
(empty
+> anon ("url" %: string)
+> flag "-X" (optional_with_default "GET" string)
Expand Down
4 changes: 2 additions & 2 deletions bin/cohttp_server_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ let start_server docroot port host index verbose cert_file key_file () =
Server.create
~on_handler_error:(`Call (fun addr exn ->
Log.Global.error "Error from %s" (Socket.Address.to_string addr);
Log.Global.sexp ~level:`Error exn Exn.sexp_of_t))
Log.Global.sexp ~level:`Error (Exn.sexp_of_t exn)))
~mode
listen_on
(handler ~info ~docroot ~index ~verbose)
>>= fun _ -> never ()

let _ =
Command.async_basic
Command.async
~summary:"Serve the local directory contents via HTTP or HTTPS"
Command.Spec.(
empty
Expand Down
2 changes: 1 addition & 1 deletion examples/async/hello_world.ml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let start_server port () =
>>= fun _ -> Deferred.never ()

let () =
Command.async_basic
Command.async
~summary:"Start a hello world Async server"
Command.Spec.(empty +>
flag "-p" (optional_with_default 8080 int)
Expand Down
2 changes: 1 addition & 1 deletion examples/async/receive_post.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let start_server port () =
>>= fun _ -> Deferred.never ()

let () =
Command.async_basic
Command.async
~summary:"Simple http server that outputs body of POST's"
Command.Spec.(empty +>
flag "-p" (optional_with_default 8080 int)
Expand Down
2 changes: 1 addition & 1 deletion examples/async/s3_cp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ let run region_str aws_access_key aws_secret_key src dst () =
end

let () =
Command.async_basic
Command.async
~summary:"Simple command line client that copies files to/from S3"
Command.Spec.(empty
+> flag "-r" (optional_with_default "us-east-1" string)
Expand Down
2 changes: 1 addition & 1 deletion lib_test/test_net_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ let run () =

let test_cases =
let open Command.Spec in
Command.async_basic ~summary:"Run HTTP Async client tests"
Command.async ~summary:"Run HTTP Async client tests"
empty run
|> Command.run
2 changes: 1 addition & 1 deletion lib_test/test_net_async_http10.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ let test () =
>>| print_endline

let _ =
Command.async_basic ~summary:"Test HTTP/1.0 response"
Command.async ~summary:"Test HTTP/1.0 response"
Command.Spec.empty test
|> Command.run
2 changes: 1 addition & 1 deletion opam
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ depends: [
]
depopts: ["async" "lwt" "js_of_ocaml"]
conflicts: [
"async" {< "111.25.00"}
"async" {< "113.24.00"}
"lwt" {< "2.5.0"}
]
available: [ocaml-version >= "4.01.0"]