Re: TidHTTP Post bug or misuse?

Giganews Newsgroups
Subject: Re: TidHTTP Post bug or misuse?
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Fri, 11 Aug 2006

"Jérémy Reynaud" <…@keepcore.com> wrote in message
news:71EDE2C19103E340…@keepcore.com...

> To isolate the problem, I create a simple application with 2 buttons, 1 to
> post with TStringList, the other to post with TIdMultiPartFormDataStream,
> the response is logged in a TMemo. The URL is a PHP page that print the
> content of the $_POST variable (print_r($_POST);).

Posting multipart data is VERY different than posting TStringList data.  The
HTTP request is formatted very differently.  Are you sure you are handling
the data properly on the server side to begin with?

> When I click on the 1st button (TStringList), I have this in the TMemo:
<snip>
> When I click on the 2nd one (TIdMultiPartFormDataStream ), I have this in
> the TMemo:
<snip>
> If I click again on the 1st one, I have:
<snip>
> Seems no more variables are posted...

Then the problem is likely in your server script.  TIdHTTP requests are
completely separate from each other.  They have no effect on each other.
Just to be sure, though, have you tried clearing the TIdHTTP.Request
property before calling Post()?

Gambit

Replies

In response to

TidHTTP Post bug or misuse? posted by Jérémy Reynaud on Fri, 11 Aug 2006