Hi again. Once again, I found the solution by myself.
On Wed, Apr 18, 2001 at 05:13:21PM +0200, Jochen Schnapka wrote:
> Hi.
>
> I wonder, which Handler I would have to invoke to mangle or adjust the
> response headers. I thought, this was the PerlFixupHandler. But
> $r->headers_out seems to be completly empty.
>
>
> This is my handler:
>
> use strict;
> use Apache::Constants;
> use Apache::Table;
>
> sub handler {
> my $r = shift;
>
> # this does not work, it's empty:
>
> $r->headers_out->do(sub {
> my($key, $value) = @_;
> $r->log_error("$key => $value\n");
> 1;
> });
Hehe, but this works:
$r->request->headers_out ...
So headers_out is located beneath the request sub-object (or however you
like to call it). Unfortunately this is not clearly documented (I read the
online book, chapter 7 and 9).
I feel, that some methods can be accessed directly from top (as
headers_in()), others not (like headers_out) :-(
Maybe this should be fixed or documented, otherwise somebody tell me
please, if I am completly wrong :-)
Greetings, ~~~:-Jochen
--
After a number of decimal places, nobody gives a damn.