From: Prashanth Mundkur Date: Wed, 24 Jun 2009 01:02:10 +0000 (-0700) Subject: [http]: check for final in payload callback. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0c05ebe74317bcf788df36a68d92f7da498cc006;p=xenclient%2Ftoolstack.git [http]: check for final in payload callback. --- 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