File tree Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 92
92
( = :version ) )
93
93
;;
94
94
( cohttp
95
- ( >= 6 .0.0~beta2 ) )
95
+ ( >= 6 .0.0) )
96
96
( fmt
97
97
( >= 0 .9.0) )
98
98
( uri
175
175
:with -test) )
176
176
( cohttp
177
177
( and
178
- ( >= 6 .0.0~beta2 )
178
+ ( >= 6 .0.0)
179
179
:with -test) )
180
180
( cohttp-lwt-unix
181
181
( and
182
- ( >= 6 .0.0~beta2 )
182
+ ( >= 6 .0.0)
183
183
( <> :os " win32" )
184
184
:with -test) )
185
185
( conduit-lwt-unix
223
223
:with -test) )
224
224
( cohttp-lwt
225
225
( and
226
- ( >= 6 .0.0~beta2 )
226
+ ( >= 6 .0.0)
227
227
:with -test) )
228
228
( qcheck-multicoretests-util
229
229
( and
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ module Server = struct
242
242
let callback conn req body = `Response (callback conn req body) in
243
243
make_response_action ?conn_closed ~callback ()
244
244
245
- let respond ?headers ? flush ~status ~body () =
245
+ let respond ?headers ~status ~body () =
246
246
let encoding =
247
247
match headers with
248
248
| None -> Cohttp.Body. transfer_encoding body
@@ -251,12 +251,12 @@ module Server = struct
251
251
| Http.Transfer. Unknown -> Cohttp.Body. transfer_encoding body
252
252
| t -> t)
253
253
in
254
- let res = Cohttp.Response. make ~status ?flush ~encoding ?headers () in
254
+ let res = Cohttp.Response. make ~status ~encoding ?headers () in
255
255
(res, body)
256
256
257
- let respond_string ?headers ? flush ~status ~body () =
257
+ let respond_string ?headers ~status ~body () =
258
258
let res =
259
- Cohttp.Response. make ~status ?flush
259
+ Cohttp.Response. make ~status
260
260
~encoding: (Http.Transfer. Fixed (Int64. of_int (String. length body)))
261
261
?headers ()
262
262
in
@@ -288,7 +288,9 @@ module Server = struct
288
288
(if keep_alive then " keep-alive" else " close" )
289
289
in
290
290
let res = { res with headers } in
291
- Response. write (Body. write_with Response. write_body body) res oc;
291
+ Response. write ~flush: false
292
+ (Body. write_with Response. write_body body)
293
+ res oc;
292
294
if keep_alive then handle t conn ic oc
293
295
end
294
296
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ bug-reports: "https://github.com/ocaml-multicore/picos/issues"
10
10
depends: [
11
11
"dune" {>= "3.14"}
12
12
"picos_io" {= version}
13
- "cohttp" {>= "6.0.0~beta2 "}
13
+ "cohttp" {>= "6.0.0"}
14
14
"fmt" {>= "0.9.0"}
15
15
"uri" {>= "4.4.0"}
16
16
"odoc" {with-doc}
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ depends: [
22
22
"qcheck-stm" {>= "0.3"}
23
23
"alcotest" {>= "1.7.0" & with-test}
24
24
"backoff" {>= "0.1.0" & with-test}
25
- "cohttp" {>= "6.0.0~beta2 " & with-test}
26
- "cohttp-lwt-unix" {>= "6.0.0~beta2 " & os != "win32" & with-test}
25
+ "cohttp" {>= "6.0.0" & with-test}
26
+ "cohttp-lwt-unix" {>= "6.0.0" & os != "win32" & with-test}
27
27
"conduit-lwt-unix" {>= "6.2.2" & os != "win32" & with-test}
28
28
"conf-npm"
29
29
{arch != "x86_32" & arch != "riscv64" & os != "win32" & with-test}
@@ -34,7 +34,7 @@ depends: [
34
34
"multicore-magic" {>= "2.3.0" & with-test}
35
35
"multicore-magic-dscheck" {>= "2.3.0" & with-test}
36
36
"ocaml-version" {>= "3.6.4" & with-test}
37
- "cohttp-lwt" {>= "6.0.0~beta2 " & with-test}
37
+ "cohttp-lwt" {>= "6.0.0" & with-test}
38
38
"qcheck-multicoretests-util" {>= "0.3" & with-test}
39
39
"uri" {>= "4.4.0" & with-test}
40
40
"odoc" {>= "2.4.1" & with-doc}
You can’t perform that action at this time.
0 commit comments