Re: Proxy and ProcessFilter

On Tue, 26 Aug 1997, Jamye M Harrison wrote:

> 
> We are wanting to use Jigsaw as a proxy so that we can add a standard set
> of icons & HREFs to all pages returned to users who have their browsers
> directed through the proxy. It appears that Jigsaw, and the ProcessFilter
> would achieve this end very well.
> 
> However, after a fair amount of trouble trying to setup Jigsaw as a proxy
> (running on an Win NT server) we are unable to successfully install and use
> the ProcessFilter.
> 
> Should we be adding it as a filter under root??
> 
> Once we add the filter how to we specify the command it should run?? Trying
> to do this from the filter(0) links on the configuration pages does not
> work.

hi, jamye.

this happens because whenever the target resource is looked up, 
filters are applied, so even though you access the resource
through the editor, Jigsaw tries to apply the filter.

See the code of the ProcessFilter's outgoingFilter:

public Reply outgoingFilter (Request request, Reply reply)   
          throws HTTPException
      {
          Process       process   = null ;
          ProcessFeeder feeder    = null ;
          String        command[] = getCommand() ;
 
          // Some sanity checks:
          if (reply.getStatus() != HTTP.OK)
              return null;
          InputStream in = reply.openStream() ;
          if ( in == null )
              return null;
          if ( command == null ) {
              Reply error = request.makeReply(HTTP.INTERNAL_SERVER_ERROR);
              error.setContent("The process filter of this resource is not
"                           + " configured properly (it has no 
command).");
              throw new HTTPException(error);
          }
 
Remove the exception throwing here:

         if ( command == null ) {
               return null;
         }

Now, you can edit the command field of the form.

Julianne.

> Are we able to edit a configuration file directly on the server??
> 
> Also, has anyone succeeded in processing, filtering and adding additional
> HTML code to pages returned via a proxy (Jigsaw or any others)??


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Julianne Freire Pepeu    Departamento de Informatica, UFPE
jfsp@di.ufpe.br          http://www.di.ufpe.br/~jfsp

Received on Tuesday, 26 August 1997 10:42:59 UTC