From 0c05ebe74317bcf788df36a68d92f7da498cc006 Mon Sep 17 00:00:00 2001 From: Prashanth Mundkur Date: Tue, 23 Jun 2009 18:02:10 -0700 Subject: [PATCH] [http]: check for final in payload callback. --- libs/http/http.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/http/http.ml b/libs/http/http.ml index e50e7a6..b87c848 100644 --- a/libs/http/http.ml +++ b/libs/http/http.ml @@ -877,7 +877,7 @@ module Payload = struct let check_payload_callback s final = match s.payload_callback with | None -> () - | Some f when Buffer.length s.body >= max_buffered_size -> + | Some f when final || Buffer.length s.body >= max_buffered_size -> let content = Buffer.contents s.body in Buffer.clear s.body; f content 0 (String.length content) final -- 2.39.5