Re: Indy HTTPS POST is truncating the response at 34076 bytes

Giganews Newsgroups
Subject: Re: Indy HTTPS POST is truncating the response at 34076 bytes
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Mon, 22 May 2006

"aandea" <al…@aandea.com> wrote in message
news:BC06CCDD63F9E240al…@aandea.com...

> Below is the main processing logic from the Indy HTTP ReadResult function.

I think the solution is simple - remove the call to Connected() in the
while() loop of TIdIOHandler.ReadStream(), ie:

    while {Connected and} (LWorkCount > 0) do begin

TIdIOHandler.ReadBytes(), which is called inside the loop, already checks
the connected state of the connection, so there is no reason for
ReadStream() to do it as well.  This way, ReadBytes(), not ReadStream(),
will throw the EIdConnClosedGracefully exception, which ReadStream() can
then catch to flush any remaining data from the InputBuffer to the target
stream before then exiting to TIdCustomHTTPR.ReadResult().

Gambit

Replies

In response to

Indy HTTPS POST is truncating the response at 34076 bytes posted by aandea on Mon, 22 May 2006