diff --git a/lwt-core/cohttp_lwt.ml b/lwt-core/cohttp_lwt.ml index 6b8ddf284b..5ebef5bc27 100644 --- a/lwt-core/cohttp_lwt.ml +++ b/lwt-core/cohttp_lwt.ml @@ -75,6 +75,10 @@ module Make_client closefn (); return (res, `Empty) end + let read_response ~closefn ic oc meth = + let t = read_response ~closefn ic oc meth in + Lwt.on_termination t closefn; + t let is_meth_chunked = function | `HEAD -> false