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

leledumbo leledumbo_cool at yahoo.co.id
Sun Jan 18 16:51:52 CET 2015

> i was thinking that there's some sort of inbound traffic that may be
filling a 
buffer that needs to be emptied... i don't know or have any other ideas to

Mmm...could be, that's what should be searched for.

> The problem is not in TFPHTTPClient. The problem is the data and/or URL
> for request 3: 

OK, now try creating a new TFPHTTPClient instance for each request, don't
reuse. It should work as it's my current workaround, but I think it's a
waste of resource. Can you explain that?

I also use strace to compare the the 3 consecutive FormPost call using one
TFPHTTPClient instance with 3 curl command line calls. The only difference I
see is that TFPHTTPClient sends cookie and some other headers instead of
just a url-encoded fields. Content-Length in the 2nd example that returns
empty string is 0, while the 1st example is the same as yours: stuck at

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Cannot-reuse-TFPHTTPClient-object-for-2-different-POST-requests-tp5720779p5720791.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

More information about the fpc-pascal mailing list