Article View: borland.public.cppbuilder.internet.socket
Article #4966Re: Non AnsiString Incoming Buffering in Indy Servers
From: Colin B Maharaj
Date: Mon, 22 Nov 2004 19:33
Date: Mon, 22 Nov 2004 19:33
37 lines
2816 bytes
2816 bytes
Hi again Remy, see what happens when you do not know what you are doing,
I did not realize that the Keep-Alive Directive was coming from the
browser and being sent to the WebServer via my code, like you said I
tweaked the header to remove this directive so the connection is now
non-pesistant and the code block.......
TMemoryStream * Stream = new TMemoryStream;
WebSite->ReadStream(Stream, -1, true);
Browser->Connection->WriteStream(Stream);
delete Stream;
works perfectly, since the webserver will not make persistant connections.
Here is a snap of the headers.......
GET
http://tothechildren.tripod.com/imagelib/sitebuilder/layout/nature_s_b2.gif
HTTP/1.0
Accept: */*
Referer: http://tothechildren.tripod.com/childrenstories/id5.html
Accept-Language: en-tt
Proxy-Connection: Keep-Alive
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
MathPlayer 2.0; .NET CLR 1.1.4322)
Host: tothechildren.tripod.com
Cookie: CookieStatus=COOKIE_OK;
MEMBER_PAGE=tothechildren/childrenstories/id5.html;
REFERRER=http://images.google.com/imgres?imgurl=http://tothechildren.tripod.com/sitebuildercontent/sitebuilderpictures/ashley.jpg&imgrefurl=http://tothechildren.tripod.com/childrenstories/id5.html&h=731&w=1041&sz=894&tbnid=UV26nB6GTP0J:&tbnh=105&tbnw=149&start=6&prev=/images%3Fq%3Dbig%2Bold%2Bshoe%26hl%3Den%26lr%3D%26sa%3DN;
sidebarurl=http://tothechildren.tripod.com/childrenstories/id5.html
As you can see I am not sending the "Proxy-Connection: Keep-Alive" to
the server so things are near perfect, Now I just have to handle
exception errors (yeah 'just') and other error handling stuff and I will
have a nifty proxy server. I am using this to do content filtering.
Thanks for your help...
Technical Details
Message-ID:
<41a23f17$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<41a1c4cf$1@newsgroups.borland.com> <41a22d10$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,9e62d9fb8e1bfe4a X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 22 Nov 2004 15:33:49 -0400 From: Colin B Maharaj <noreply@myhost.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20040219 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Non AnsiString Incoming Buffering in Indy Servers References: <41a1c4cf$1@newsgroups.borland.com> <41a22d10$1@newsgroups.borland.com> In-Reply-To: <41a22d10$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 200.108.15.43 Message-ID: <41a23f17$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1101152023 200.108.15.43 (22 Nov 2004 11:33:43 -0700) Lines: 41 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail