Skip to content

Commit

Permalink
Merge pull request #983 from mefyl/master
Browse files Browse the repository at this point in the history
Cohttp_eio: Relax requirement on `Server.connection_handler`.
  • Loading branch information
mseri authored Jun 14, 2023
2 parents ee1ba0b + 6c81cdc commit 3ae57c3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Unreleased

- cohttp-lwt server: call conn_closed before drainig the body of response on error (pirbo)
- cohttp-eio: Relax socket interface requirement on `Server.connection_handler`.

## v6.0.0~alpha1 (2023-04-28)

Expand Down
2 changes: 1 addition & 1 deletion cohttp-eio.opam
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
depends: [
"dune" {>= "3.0"}
"base-domains"
"eio" {>= "0.7"}
"eio" {>= "0.10"}
"eio_main" {with-test}
"mdx" {with-test}
"uri" {with-test}
Expand Down
2 changes: 1 addition & 1 deletion cohttp-eio/examples/client_timeout.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let () =
Eio.Time.with_timeout env#clock timeout_s (fun () ->
let host, port = ("www.example.org", 80) in
let he = Unix.gethostbyname host in
let addr = `Tcp (Eio_unix.Ipaddr.of_unix he.h_addr_list.(0), port) in
let addr = `Tcp (Eio_unix.Net.Ipaddr.of_unix he.h_addr_list.(0), port) in
let conn = Net.connect ~sw env#net addr in
let res = Client.get ~conn ~port env ~host "/" in
Client.read_fixed res |> Result.ok)
Expand Down
2 changes: 1 addition & 1 deletion cohttp-eio/src/cohttp_eio.mli
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module Server : sig
val connection_handler :
handler ->
#Eio.Time.clock ->
#Eio.Net.stream_socket ->
#Eio.Flow.two_way ->
Eio.Net.Sockaddr.stream ->
unit
(** [connection_handler request_handler] is a connection handler, suitable for
Expand Down
3 changes: 2 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ should also be fine under Windows too.
"A CoHTTP server and client implementation based on `eio` library. `cohttp-eio`features a multicore capable HTTP 1.1 server. The library promotes and is built with direct style of coding as opposed to a monadic.")
(depends
base-domains
(eio (>= 0.7))
(eio
(>= 0.10))
(eio_main :with-test)
(mdx :with-test)
(uri :with-test)
Expand Down

0 comments on commit 3ae57c3

Please sign in to comment.