> -----Original Message-----
> From: Jochen Schnapka [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 12:52 PM
> To: [EMAIL PROTECTED]
> Subject: Re: which Handler to adjust Response-Headers?
> 
> 
> On Thu, Apr 19, 2001 at 08:42:40AM -0400, Geoffrey Young wrote:
> 
> > > > $r->headers_out seems to be completly empty.
> > 
> > I think $r->headers_out will be empty until you do something to put
> > something in it (like $r->headers_out->add(), $r->no_cache(1), or
> > $r->send_http_headers()).  Depending on which modules you 
> have in your
> > apache binary (like maybe mod_expires?), there may be no 
> activity that sets
> > headers until you call $r->send_http_headers().
> 
> but there *is* a bunch of headers, which is sent back, even 
> if I do not
> touch anything. and these headers must be readable somewhere, 
> let it be
> Content-Length, Type, Date, whatever...

yes, after you call send_http_header().  Apache sets some of these for you
when the response is sent to the client if you don't call it yourself.  If
you try and find them before the content is actually sent (like in a
PerlFixupHandler) you won't see them...

[snip]

> 
> sub headers_out {
> #---------------------------------------------------------------------
> # dump all of the outbound response headers
> #---------------------------------------------------------------------
> 
>   my $self              = shift;
> 
> # [...]
> 
>   my $r                 = $self->{request};
> #  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

$self->{request} is not a method call - what you essentially are getting is

$r = $r;

so what you think is $r->request->headers_out() is really just
$r->headers_out().

;)

--Geoff

Reply via email to