[fpc-pascal] Cannot reuse TFPHTTPClient object for 2 different POST requests

Michael Van Canneyt michael at freepascal.org
Tue Jan 20 18:24:48 CET 2015

On Tue, 20 Jan 2015, leledumbo wrote:

>> Because the header may have been set on purpose by the user.
> Even if the actual data sent is not of the same length?

You cannot always trust the Size property of a stream.

>> I will look at a mechanism to remove headers that were 'automatically'
>> added.
> How about a property ClearHeadersOnEachRequest (defaults to true for
> backward compatibility)?

That is not quite correct, because that will also clear any custom headers you may want to set.
Cookies, Accept-encoding and so on.

Maybe ForceStandardHeaders or so.


More information about the fpc-pascal mailing list