THRIFT-5304 TWinHTTPClientImpl may incorrectly report that the message size is reached
Client: Delphi
Patch: Jens Geyer
diff --git a/lib/delphi/src/Thrift.Transport.WinHTTP.pas b/lib/delphi/src/Thrift.Transport.WinHTTP.pas
index 5794b1c..b0f32ef 100644
--- a/lib/delphi/src/Thrift.Transport.WinHTTP.pas
+++ b/lib/delphi/src/Thrift.Transport.WinHTTP.pas
@@ -333,6 +333,8 @@
     else raise TTransportExceptionInterrupted.Create( sMsg);
   end;
 
+  // we're about to receive a new message, so reset everyting
+  ResetConsumedMessageSize(-1);
   FInputStream := THTTPResponseStream.Create( http);
   if http.QueryTotalResponseSize( dwSize)  // FALSE indicates "no info available"
   then UpdateKnownMessageSize( dwSize);