Discuss new Handler that return Apache2::Const::OK even if the response Status Code was changed to avoid default error pages

Keywan Ghadami <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hello I like to share a new mod perl handler that allow a perl script
to change the http status code of the response but sends it's own content instead of the apache default errorpages

The problem is discribed here:
http://mail-archives.apache.org/mod_mbox/perl-modperl/200803.mbox/%[email protected]%3E

I made a very little change in the subrotuine default_handler of ModPerl::Registry module
     #...
     my $rc = $self->run;
     return $rc;
     #...

instead of returning the "$self->{REQ}->status"

I will not suggest this as patch for ModPerl::Registry because it's not realy a bug in ModPerl::Registry
  module, it's just a decision of having the status handled by the apache web sever or within your perl script
But this Desision could be made automaticly if there is a way to check if the script printed out a http body already.

Any Ideas or Suggestions?



Best regads
Keywan Ghadami
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.