Thread View: borland.public.cppbuilder.internet.socket
3 messages
3 total messages
Started by Nicolae Fieraru
Fri, 15 Jul 2005 17:24
Indy POST-ing Empty Parameters?
Author: Nicolae Fieraru
Date: Fri, 15 Jul 2005 17:24
Date: Fri, 15 Jul 2005 17:24
20 lines
1428 bytes
1428 bytes
Hi All, I try to post data on a web site, and for some reason the server reject my post (internal server error 500). I used a sniffer and I can compare the data sent by Internet Explorer and I notice it contains some empty variables. I tried to send the variables from Indy like this: ParamData->Values->["MyVariable"] = ""; but Indy actually doesn't send "MyVariable" at all if it sees it is empty. Is there a way of "convincing" Indy to send it anyway? I use Indy 9.0.17, if that matters. Any response appreciated. Regards, Nicolae
Re: Indy POST-ing Empty Parameters?
Author: Remy Lebeau (TeamB)
Date: Fri, 15 Jul 2005 18:32
Date: Fri, 15 Jul 2005 18:32
27 lines
1774 bytes
1774 bytes
"Nicolae Fieraru" <nospam@please.com> wrote in message
news:42d7f15e@newsgroups.borland.com...
> I try to post data on a web site, and for some reason the server reject my
> post (internal server error 500). I used a sniffer and I can compare the
> data sent by Internet Explorer and I notice it contains some empty
> variables.
Please show your actual code, and the actual data that both Indy and IE are
sending.
> I tried to send the variables from Indy like this:
>
> ParamData->Values->["MyVariable"] = "";
>
> but Indy actually doesn't send "MyVariable" at all if it sees it is empty.
Assigning an empty string to a TStrings class via the Values[] property
removes that value from the list. That is a Borland idiom, not an Indy one.
If you need to send blank values, then you need to use the Add() or Insert()
method instead of Values[], ie:
ParamData->Add("MyVariable=");
Gambit
Re: Indy POST-ing Empty Parameters?
Author: Nicolae Fieraru
Date: Sat, 16 Jul 2005 03:34
Date: Sat, 16 Jul 2005 03:34
30 lines
1614 bytes
1614 bytes
> Please show your actual code, and the actual data that both Indy and IE
> are
> sending.
Hi Remy,
Thank you very much for your support. The question I had was only related
with posting the empty variables, and your advice, to use
ParamData->Add("MyVariable=");
worked as expected.
Best wishes,
Nicolae
> Assigning an empty string to a TStrings class via the Values[] property
> removes that value from the list. That is a Borland idiom, not an Indy
> one.
> If you need to send blank values, then you need to use the Add() or
> Insert()
> method instead of Values[], ie:
>
> ParamData->Add("MyVariable=");
>
>
> Gambit
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads