Skip to content

Commit

Permalink
Upgrade to cohttp 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed Nov 27, 2024
1 parent 3d354d6 commit 0be83e3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
(= :version))
;;
(cohttp
(>= 6.0.0~beta2))
(>= 6.0.0))
(fmt
(>= 0.9.0))
(uri
Expand Down Expand Up @@ -175,11 +175,11 @@
:with-test))
(cohttp
(and
(>= 6.0.0~beta2)
(>= 6.0.0)
:with-test))
(cohttp-lwt-unix
(and
(>= 6.0.0~beta2)
(>= 6.0.0)
(<> :os "win32")
:with-test))
(conduit-lwt-unix
Expand Down Expand Up @@ -223,7 +223,7 @@
:with-test))
(cohttp-lwt
(and
(>= 6.0.0~beta2)
(>= 6.0.0)
:with-test))
(qcheck-multicoretests-util
(and
Expand Down
8 changes: 4 additions & 4 deletions lib/picos_io_cohttp/picos_io_cohttp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ module Server = struct
let callback conn req body = `Response (callback conn req body) in
make_response_action ?conn_closed ~callback ()

let respond ?headers ?flush ~status ~body () =
let respond ?headers ~status ~body () =
let encoding =
match headers with
| None -> Cohttp.Body.transfer_encoding body
Expand All @@ -251,12 +251,12 @@ module Server = struct
| Http.Transfer.Unknown -> Cohttp.Body.transfer_encoding body
| t -> t)
in
let res = Cohttp.Response.make ~status ?flush ~encoding ?headers () in
let res = Cohttp.Response.make ~status ~encoding ?headers () in
(res, body)

let respond_string ?headers ?flush ~status ~body () =
let respond_string ?headers ~status ~body () =
let res =
Cohttp.Response.make ~status ?flush
Cohttp.Response.make ~status
~encoding:(Http.Transfer.Fixed (Int64.of_int (String.length body)))
?headers ()
in
Expand Down
2 changes: 1 addition & 1 deletion picos_io_cohttp.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bug-reports: "https://github.com/ocaml-multicore/picos/issues"
depends: [
"dune" {>= "3.14"}
"picos_io" {= version}
"cohttp" {>= "6.0.0~beta2"}
"cohttp" {>= "6.0.0"}
"fmt" {>= "0.9.0"}
"uri" {>= "4.4.0"}
"odoc" {with-doc}
Expand Down
6 changes: 3 additions & 3 deletions picos_meta.opam
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ depends: [
"qcheck-stm" {>= "0.3"}
"alcotest" {>= "1.7.0" & with-test}
"backoff" {>= "0.1.0" & with-test}
"cohttp" {>= "6.0.0~beta2" & with-test}
"cohttp-lwt-unix" {>= "6.0.0~beta2" & os != "win32" & with-test}
"cohttp" {>= "6.0.0" & with-test}
"cohttp-lwt-unix" {>= "6.0.0" & os != "win32" & with-test}
"conduit-lwt-unix" {>= "6.2.2" & os != "win32" & with-test}
"conf-npm"
{arch != "x86_32" & arch != "riscv64" & os != "win32" & with-test}
Expand All @@ -34,7 +34,7 @@ depends: [
"multicore-magic" {>= "2.3.0" & with-test}
"multicore-magic-dscheck" {>= "2.3.0" & with-test}
"ocaml-version" {>= "3.6.4" & with-test}
"cohttp-lwt" {>= "6.0.0~beta2" & with-test}
"cohttp-lwt" {>= "6.0.0" & with-test}
"qcheck-multicoretests-util" {>= "0.3" & with-test}
"uri" {>= "4.4.0" & with-test}
"odoc" {>= "2.4.1" & with-doc}
Expand Down

0 comments on commit 0be83e3

Please sign in to comment.