From fca8ba46e12427aef5bbf050df97a0691ed3768e Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Mon, 25 Mar 2024 10:18:27 -0400 Subject: [PATCH] make sure to flush underlying stream --- src/camlzip/Tiny_httpd_camlzip.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/camlzip/Tiny_httpd_camlzip.ml b/src/camlzip/Tiny_httpd_camlzip.ml index c15a3158..8be7da00 100644 --- a/src/camlzip/Tiny_httpd_camlzip.ml +++ b/src/camlzip/Tiny_httpd_camlzip.ml @@ -12,7 +12,8 @@ let encode_deflate_writer_ ~buf_size (w : W.t) : W.t = let oc' = Iostream_camlzip.compressed_out ~buf_size ~level:4 oc in write (oc' :> IO.Output.t); IO.Output.flush oc'; - IO.Output.close oc' + IO.Output.close oc'; + IO.Output.flush oc in IO.Writer.make ~write:write' ()