perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Nicol" <>
Subject Re: Best practices for returning 404/file-not-found pages inside and outside of mod_perl
Date Tue, 15 Apr 2008 20:28:32 GMT
On Tue, Apr 15, 2008 at 2:19 PM, Mark Stosberg <> wrote:
>   return a true 404

Since MP already replaces the C<exit> function, it shouldn't be too tricky to
abstract 404 and other error codes with by letting exit take arguments -- then
you could do what you want with C<<exit(STATUS => 404)>> for instance.

I don't know how hard that feature would be to add; adding it to mod-perl might
drive similar features added to other CGI systems, for instance the apache
project could add a mapping of specific non-zero exit codes from CGI programs
to things other than "500 internal server error."

Of course, there's always redirecting to a location that really doesn't exist,
but that isn't "true."

Dave the idea guy

View raw message