Bjørn Ola Smievoll ([EMAIL PROTECTED]) said something to this effect:
> [Sorry for being so verbose, hope somebody still have the time and
> patience to read it all].
> 
> I have a setup where a PerlTransHandler registers a PerlContentHandler
> based simply on whether $r->uri ends with '.html' or not.  The
> TransHandler does no verifying of the existence of the file, that
> doesn't happen until the ContentHandler kicks in.  For an unsuccessful
> '-e' test, NOT_FOUND is returned from the ContentHandler.  All this
> worked fine until I added an perl-based handler for the 404 using the
> ErrorDocument parameter in httpd.conf[1].

Why are you so averse to handling it in the translation phase? I think it
makes the content handler much cleaner.

> Now, when a request for a non-existent document is sent the httpd
> child starts looping, writing file not found errors (for the
> ErrorDocument handler) in the log, repeatedly returning the error from
> the ErrorDocument handler to the client 

You don't mention how you are setting the error document handler. Are you
using

    $r->internal_redirect('/http_err');

or

    $r->push_handler(PerlHandler => \&UiO::ErrDoc::handler);
    return DECLINED;

or some other method? How you are setting it might be significant.

I think that Apache does the file stating and such during the translation
phase, so returning NOT_FOUND from the content phase might be too late for
Apache to step in and take over with the sending of the ErrorDocument. In
other words, its too late for Apache to do the Alias translation. Of course,
I may be wrong about this as well.

> and hogging memory.

As an aside, especially during development (when things like this are likely
to happen), see these documents:

http://perl.apache.org/guide/performance.html#Limiting_the_Size_of_the_Process
http://perl.apache.org/guide/performance.html#Limiting_Other_Resources_Used_by

(darren)

--
There are trivial truths and there are great Truths. The opposite of a
trival truth is obviously false. The opposite of a great Truth is also true.
    -- Neils Bohr

Reply via email to