Article View: borland.public.cppbuilder.internet.socket
Article #5151Re: Indy TCPServer and proxies
From: Lapo Guidi
Date: Sun, 10 Oct 2004 00:12
Date: Sun, 10 Oct 2004 00:12
28 lines
2041 bytes
2041 bytes
Hi Remy.
As usually you are a guru.
I wrote many lines of code in few days and all approch I tried didn't work.
Then you wrote for me just few lines of code, I changed just 2 rows and it
works fine.
Finally I added the host check to lock or redirect unwanted url to be
displayed.
Thanks very much.
Lapo
PS. Just for curiosity, the lines i changed are:
AnsiString Request = AThread->Connection->ReadLn(LF, IdTimeoutDefault, -1);
to
AnsiString Request = AThread->Connection->ReadLn("\r\n\r\n",
IdTimeoutDefault, -1);
because I need all headers to be forwarded.
and
AThread->NetData = (Command + " " + URL.SubString(8, MaxInt) + " " +
Version);
to
AThread->NetData=(Command+" "+uri->Path+uri->Document+uri->Params+"
"+Version+"\r\n")
because the GET command didn't want the host inside request.
THANKS!
Technical Details
Message-ID:
<41687e62@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4166efc5$1@newsgroups.borland.com> <4166fc3a$1@newsgroups.borland.com> <41671c26@newsgroups.borland.com> <4167289e$1@newsgroups.borland.com> <416732b1$1@newsgroups.borland.com> <41673f29$1@newsgroups.borland.com> <4168173c$1@newsgroups.borland.com> <416824b3$1@newsgroups.borland.com> <41682b12$1@newsgroups.borland.com> <416849a8$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,3acb790ca748eb20 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Lapo Guidi" <lapoguidi@inwind.it> Newsgroups: borland.public.cppbuilder.internet.socket References: <4166efc5$1@newsgroups.borland.com> <4166fc3a$1@newsgroups.borland.com> <41671c26@newsgroups.borland.com> <4167289e$1@newsgroups.borland.com> <416732b1$1@newsgroups.borland.com> <41673f29$1@newsgroups.borland.com> <4168173c$1@newsgroups.borland.com> <416824b3$1@newsgroups.borland.com> <41682b12$1@newsgroups.borland.com> <416849a8$1@newsgroups.borland.com> Subject: Re: Indy TCPServer and proxies Date: Sun, 10 Oct 2004 02:12:57 +0200 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 82.49.68.221 Message-ID: <41687e62@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1097367138 82.49.68.221 (9 Oct 2004 17:12:18 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail