Apache (as in httpd) will set the 'Expires' header to the same value as the
'Date' header when no_cache is flagged in the request_rec.  When your Perl
handler sets $r->no_cache(1), mod_perl (in Apache.xs) is setting the
'Pragma: no-cache' and 'Cache-control: no-cache' headers in addition to
setting the no_cache flag in the request_rec.  From the code in Apache.xs,
it seems like setting $r->no_cache(0) will unset the flag, but not remove
the headers.

--
Kyle Oppenheim
Tellme Networks, Inc.
http://www.tellme.com


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Patrick
Sent: Wednesday, April 04, 2001 2:47 AM
To: [EMAIL PROTECTED]
Subject: no_cache & pragma/cache-control headers : confusion


Dear all,

There is some kind of confusion in my head, and the Eagle book seems
to me even more confusing. Any help appreciated.

First, I always thought that no_cache() does everything regarding
headers, and that you have just to turn it on or off.
However I discovered yesterday that, at least in my setup, even with
no_cache(0) I have
Pragma: no-cache
Cache-control: no-cache
which seems counter-intuitive to me.

I've checked the Eagle : it says that no_cache() only adds an Expires
field.
Ok. But then from where does the Pragma header come ?

About ->headers_out() it is specifically said : In addition, the
Pragma: no-cache idiom, used to tell browsers not to cache the
document, should be set indirectly using the no_cache() method.

So, that seems confusing to me, since the no_cache() methods seem not
to deal with Pragma headers.

Who sets Pragma/Cache-control headers and why are they like that by
default ?
How to override that (with headers_out ?) ?

TIA.

--
Patrick.
``C'est un monde qui n'a pas les moyens de ne plus avoir mal.''

Reply via email to