Article View: borland.public.cppbuilder.internet.socket
Article #3680Re: Indy POST-ing Empty Parameters?
From: 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
Technical Details
Message-ID:
<42d801d4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<42d7f15e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2b66bcbcc4059b07 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <42d7f15e@newsgroups.borland.com> Subject: Re: Indy POST-ing Empty Parameters? Date: Fri, 15 Jul 2005 11:32:25 -0700 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <42d801d4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1121452500 68.69.17.41 (15 Jul 2005 11:35:00 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail