Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Re: Best practices for returning 404/file-not-found pages inside and outside of mod_perl

Perrin Harkins

2008-04-22

Replies: Find Java Web Hosting

Author LoginPost Reply
On Tue, Apr 22, 2008 at 2:27 PM, Mark Stosberg <mark@(protected):
>  A. If I just set "status => 404" with CGI.pm / Apache::Registry and
>   return nothing, it works the first time, and then after that I
>   get a lot of these errors:
>
>   "[Tue Apr 22 13:47:07 2008] [error] Can't locate SAP/QuickSearch.pm
> in @INC" And indeed, the path that should be set via PerlSetEnv is
> missing.

Hmm, PerlSetEnv depends on being inside a specific
Location/File/Directory block. Are you sure that apache has resolved
to the block you think it's in when you have this problem?

>  B. If I sent "status => 404" *and* send content, the result is that
> two pages are displayed: One is the ErrorDocument for 404, and the
> other is the content I sent.

Yeah, it can't recall content you've already sent. I think mod_cgi
avoids this issue by buffering everything.

- Perrin
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.