On Wed, 2003-06-11 at 05:58, Gareth Kirwan wrote:
> By the way - I have thought of doing a
> $r->headers_out->set('Content-Length' => length $_ ) in the filter of
> an autohandler - but I'd prefer something that affects all sites at
> once.
I constructed the following code from documentation sources and have not
tested it. You may need to play with it, especially the $req->exec
line.. maybe it should be a ->comp or ->subrequest? Perhaps it simply
doesn't matter. ->call_self might also work.
In your handler:
my $req = $ah->prepare_request($r);
# $req must be an Apache status code if it's not an object
return $req unless ref($req);
return DECLINED
unless $req->request_comp->source_file =~ /\.html$/;
my $buf;
$req->exec ({store=>\$buf}, $req->request_comp);
$r->headers_out->set('Content-Length' => length $buf);
$r->print ($buf);
--
Eric Windisch
Systems Administrator
Site5 Internet Solutions, Inc
|