Discuss new Handler that return Apache2::Const::OK even if the responseStatus Code was changed to av
am 20.12.2009 18:59:14 von Keywan GhadamiHello 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/%3C3892494C-8883-420A-928D-65FF674D5C99@mystrands.com% 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