Put a comment about the given buffer & the ownership story
This commit is contained in:
parent
a0505c9e5e
commit
7c9efb7425
1 changed files with 4 additions and 0 deletions
|
@ -177,6 +177,8 @@ let single_http_1_1_request
|
||||||
} in
|
} in
|
||||||
let rec on_read on_eof acc ba ~off ~len =
|
let rec on_read on_eof acc ba ~off ~len =
|
||||||
let str = Bigstringaf.substring ~off ~len ba in
|
let str = Bigstringaf.substring ~off ~len ba in
|
||||||
|
(* XXX(dinosaure): the copy must be done **before** any [>>=].
|
||||||
|
The given [ba] is re-used by the [Httpaf] scheduler then. *)
|
||||||
let acc =
|
let acc =
|
||||||
acc >>= fun acc -> f response acc str
|
acc >>= fun acc -> f response acc str
|
||||||
in
|
in
|
||||||
|
@ -232,6 +234,8 @@ let single_h2_request
|
||||||
} in
|
} in
|
||||||
let rec on_read on_eof acc ba ~off ~len =
|
let rec on_read on_eof acc ba ~off ~len =
|
||||||
let str = Bigstringaf.substring ~off ~len ba in
|
let str = Bigstringaf.substring ~off ~len ba in
|
||||||
|
(* XXX(dinosaure): the copy must be done **before** any [>>=].
|
||||||
|
The given [ba] is re-used by the [H2] scheduler then. *)
|
||||||
let acc =
|
let acc =
|
||||||
acc >>= fun acc -> f response acc str
|
acc >>= fun acc -> f response acc str
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue