You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Reif Peter <ga...@adv.magwien.gv.at> on 2006/06/12 16:42:46 UTC
seen_eos is not set by some handlers
I use a PerlOutputFilter in my Apache. It seems that some
response-handlers don't set the $f->seen_eos field.
It works for local HTML-pages and the "server-status" handler.
It doesn't work for Pages that come through the standard-proxy-module,
the standard PerlResponseHander Apache2::Status and the "server-info"
handler.
My Server-Config (partially):
----------------------------
<Location /server-status>
SetHandler server-status
</Location>
<Location /server-info>
SetHandler server-info
</Location>
<Location /perl-status>
SetHandler perl-script
PerlResponseHandler Apache2::Status
PerlSetVar StatINCDebug On
</Location>
PerlOutputFilterHandler Apache::DynLayoutFilter
and my handler:
--------------
package Apache::DynLayoutFilter;
use strict;
use warnings;
use Apache2::Const qw(:common);
use Apache2::Filter ();
use Apache2::Log ();
use Apache2::RequestRec ();
use Apache2::ServerUtil;
use APR::Table ();
sub handler {
my $f = shift;
unless ($f->ctx) {
$f->r->headers_out->unset('Content-Length');
$f->ctx(1);
}
my $r = $f->r;
while ($f->read(my $buffer, 64)) {
$r->log->debug ("read-parser: <<$buffer>>");
$r->log->debug ("eos-parser: ", $f->seen_eos);
$buffer = uc $buffer;
$f->print($buffer);
}
return Apache2::Const::OK;
}
-----------------------------------
$f->seen_eos does never return 1 at proxy-requests, perl-status and
server-info!
Server Version: Apache/2.2.2
Embedded Perl version v5.8.8 for Apache/2.2.2
mod_perl version: 2.0.2
Peter