W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 2000

Re: unable to include a simple filter

From: Yves Lafon <ylafon@w3.org>
Date: Tue, 12 Sep 2000 11:07:51 +0200 (MET DST)
To: senthilvasan <senthilvasan@givingcircle.com>
cc: www-jigsaw@w3.org
Message-ID: <Pine.GSO.4.21.0009121103170.29030-100000@tarantula.inria.fr>
On Fri, 8 Sep 2000, senthilvasan wrote:

> Hi,
> I want to use the proxy server
> "Jigsaw Proxy Package (based on 2.0.2 - 5th May 1999 devel release)"
> with which I want to filter and replace one HTML tag contents. How do I do
> it. Can I get some sample code and the steps to include the filter in the
> proxy? I found the documentation for proxy server is less.

There are two kinds of filter, the server-side ones, and the client-side
one. The cache filter and proxy dispatcher filter are examples of
client-side filters.
Do you want your filter to affect the whole server (if configured to act
as a proxy AND a server)?
If so, then the easiest way is to use the server-side filter API.
You just have to do the outgoingFilter (see
check that the MimeType (if present) is text/html, then get the stream,
filter it, change the Content-Lenght (put -1 if you don't know what the
size will be), and set the stream of the reply to be your filtered stream.
Of course you should switch to 2.0.5 or 2.1.2 (2.1.2 handles HTTP/1.0 and
0.9 while 2.0.5 doesn't support HTTP/0.9, unless you get a devel version).

      /\          - Yves Lafon - World Wide Web Consortium - 
  /\ /  \        Architecture Domain - Jigsaw Activity Leader
 /  \    \/\    
/    \   /  \   http://www.w3.org/People/Lafon - ylafon@w3.org    
Received on Tuesday, 12 September 2000 05:07:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:36 UTC