Article View: borland.public.cppbuilder.internet.socket
Article #4894Re: TIdHTTP end of content problem
From: Ted Tripp
Date: Sun, 05 Dec 2004 00:10
Date: Sun, 05 Dec 2004 00:10
51 lines
2882 bytes
2882 bytes
OK--my solution--roughly
asBigString = pHTTP->Get(asSearchString);
asBigString = CheckPage(asBigString);
AnsiString HTTPThread::CheckPage(AnsiString asBigString)
{
int k;
if((asBigString.LowerCase()).AnsiPos("</html>") == 0)
{
for(k = 1; k < asBigString.Length(); k++)
{
if(asBigString[k] == '\0')
asBigString[k] = ' ';
}
}
return asBigString;
}
Oddly, the asBigString.Length() reported an accurate size--or maybe not so
oddly. Not sure why it would truncate the string and then report it a size
well past what it considered the end of the string.
"Ted Tripp" <ttripp@rankexec.com> wrote in message
news:41b15c54$1@newsgroups.borland.com...
> If anyone has a working TIdHTTP working would you test
> http://search.yahoo.com/search?p=software&ei=UTF-8&xargs=02u3hs9yoaKCstSjWzgFDdQsRBK1JMy7ctVDWwsNBUBLVYCgAYOgAePD8%3D&pstart=76&b=151
>
> It is simply a results page in Yahoo, which I hope will not change by the
> time someone runs this.
>
> The resulting page stops at "AMPLIFIES THE TERROR WITH DOOM3: RESURRECTION
> OF EVIL_ Santa Monica, CA " without completing the content and it appears
> that somewhere after the CA there is a special character that I am
> guessing IdHTTP is interpreting as an end-of-content marker. This occurs
> rarely, but is a real show stopper for some of the things I am trying to
> do.
>
> I posted the problem a few weeks ago and believe it was Remy who suggested
> I update my Indy to the latest--which I did.
>
> If you can duplicate the problem, is there a fix? If you can't duplicate
> the problem, can you point to an example (preferrably CBuilder) where I
> might find what I am missing?
>
> Regards,
> Ted
>
Technical Details
Message-ID:
<41b25214@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41b15c54$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,6b94060483c79e05 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Ted Tripp" <ttripp@rankexec.com> From: "Ted Tripp" <ttripp@rankexec.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <41b15c54$1@newsgroups.borland.com> Subject: Re: TIdHTTP end of content problem Date: Sat, 4 Dec 2004 18:10:59 -0600 Lines: 53 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 216.160.57.213 Message-ID: <41b25214@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1102205460 216.160.57.213 (4 Dec 2004 16:11:00 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail