Article View: borland.public.cppbuilder.internet.socket
Article #4463Re: retrieve a simple web page by knowing its URL
From: Steve Aletto
Date: Wed, 09 Feb 2005 13:28
Date: Wed, 09 Feb 2005 13:28
25 lines
2064 bytes
2064 bytes
> AnsiString Request="GET /stefboombastic/default.htm
> HTTP/1.1\r\n"
> "Accept: image/gif, image/x-xbitmap,
> image/jpeg, image/pjpeg, application/x-shockwave-flash,
> application/vnd.ms-excel, application/vnd.ms-powerpoint,
> application/msword, */*\r\n"
> "Accept-Language: it\r\n"
> "Accept-Encoding: gzip, deflate\r\n"
> "Host: "+IP+"\r\n"
> "Connection: Keep-Alive\r\n"
> "\r\n";
There's something wrong with your Accept tag (I guess you didn't
specify text/html). The following works:
AnsiString Request="GET /stefboombastic/default.htm
HTTP/1.1\r\n"
"Accept: text/html\r\n"
"Accept-Language: it\r\n"
"Accept-Encoding: gzip, deflate\r\n"
"Host: " + ClientSocket1->Host + "\r\n"
"Connection: Keep-Alive\r\n"
"\r\n";
Steve.
Technical Details
Message-ID:
<420a0ff0@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.maxwell.syr.edu!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4209d747@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,474753b63a76f917 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Steve Aletto" <steve_alettoANTI@SPAMhotmail.com> From: "Steve Aletto" <steve_alettoANTI@SPAMhotmail.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <4209d747@newsgroups.borland.com> Subject: Re: retrieve a simple web page by knowing its URL Date: Wed, 9 Feb 2005 14:28:11 +0100 Lines: 27 Organization: Steve Aletto X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 81.208.124.114 Message-ID: <420a0ff0@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1107955696 81.208.124.114 (9 Feb 2005 05:28:16 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.maxwell.syr.edu!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail