MirrorDirectory filters broken?

Chris Hubick writes:
 > 	The lookup method of the MirrorDirectory resource does not add
 > its filters to the LookupResult.
 > 

That's correct and hasn't been fixed in 1.0beta. The fix is to call
super.lookup without even checking the result, eg:


    public boolean lookup(LookupState ls, LookupResult lr)
        throws HTTPException
    {
        boolean superResult = super.lookup(ls, lr);

        // Get the full URL from the request:
        Request request = ls.getRequest();
        URL     url     = request.getURL() ;
 
        if ( ls.isInternal() )
            return superResult;
        // Is this really belonging to the site we are mirroring ?
        if ( mirrors != null ) {
            request.setProxy(true);
            lr.setTarget(this);
            return true;
        }
        // Emit a not found:
        Reply error = request.makeReply(HTTP.NOT_FOUND);
        error.setContent("Target resource not found.");
        lr.setTarget(null);
        lr.setReply(error);
        return true;
    }

[this ifx has been added, and will be included in 1.0beta1 - the
public version of 1.0beta]

Thanks,
Anselm.

Received on Monday, 4 August 1997 03:02:11 UTC