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

Michael Van Canneyt michael at freepascal.org
Sun Jan 18 10:10:32 CET 2015



On Fri, 16 Jan 2015, leledumbo wrote:

> Consider the following program (it's a real program with real parameters,
> nothing hidden, so you can really just try it out because the target server
> is public):

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

if you strace the program, you see what happens:

connect(3, {sa_family=AF_INET, sin_port=htons(8889), sin_addr=inet_addr("222.124.201.117")}, 16) = 0
sendto(3, "POST /tracing/sirclo/origin/key/"..., 245, 0, NULL, 0) = 245
sendto(3, "username=SIRCLO&api_key=4fd0e225"..., 56, 0, NULL, 0) = 56
recvfrom(3,

And there it stops.

I killed the program after 2 minutes. The server is not replying.

Michael.



More information about the fpc-pascal mailing list