perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keywan Ghadami <k.ghad...@ibson.com>
Subject Discuss new Handler that return Apache2::Const::OK even if the response Status Code was changed to avoid default error pages
Date Sun, 20 Dec 2009 17:59:14 GMT
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/%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



Mime
View raw message