- From: Benoit Mahe <Benoit.Mahe@sophia.inria.fr>
- Date: Mon, 29 Sep 1997 09:43:45 +0200
- To: Jacob W Anderson <jwanders@BBN.COM>
- cc: www-jigsaw@w3.org, bmahe@www43.inria.fr
> Hi! > > I'm using Jigsaw 1.0 beta to do some testing and I would like > to make Jigsaw work like a proxy and insert filters which > intercept incoming requests and their replies, like so: > > Client ---(GET)-----> Jigsaw ---(GET')---> OriginServer > | /|\ > \|/ | > My REQUEST Filter > > > Client <--(REPLY')--- Jigsaw <---(REPLY)-- OriginServer > /|\ | > | \|/ > My REPLY Filter > > I see how to setup my own error filter for intercepting the replies, > similar to the ErrorFilter which comes with the source distribution. > How would I go about inserting a filter which gets instantiated > when a GET request is received? What format would such a filter > follow, i.e. what class would I be specializing? Maybe what I'm > looking for isn't a filter, but something else?? > > Thanks! Ok, what you need is a client side filter. The class you have to specialize is w3c.www.protocol.http.PropRequestFilter which implements the RequestFilter interface. the folowings methods are use to intercept request and reply: *) public Reply ingoingFilter(Request request) use to intercept the request : > Client ---(GET)-----> Jigsaw ---(GET')---> OriginServer > | /|\ > \|/ | > My REQUEST Filter *) public Reply outgoingFilter(Request request, Reply reply) > Client <--(REPLY')--- Jigsaw <---(REPLY)-- OriginServer > /|\ | > | \|/ > My REPLY Filter To use your new filter you have to modify the property file "http-server.props". change the line : w3c.www.protocol.http.filters=w3c.www.protocol.http.cache.CacheFilter by w3c.www.protocol.http.filters=w3c.www.protocol.http.cache.CacheFilter\ | yourfilterclassname - Benoît Mahé ------------------------------------------------------- World Wide Web Consortium bmahe@sophia.inria.fr Architecture domain - Jigsaw Team tel : 04 93 65 79 89 ---------------------------------------------------------------------
Received on Monday, 29 September 1997 03:44:23 UTC