Re: no_cache pragma/cache-control headers : confusion
Hello, KOFrom the code in Apache.xs, it seems like setting $r-no_cache(0) will KOunset the flag, but not remove the headers. Well, the Expires header is also removed. But it's still broken; you can verify this buggy behavior with this simple script: use Apache (); my $r = Apache-request; $r-no_cache(1); $r-no_cache(0); $r-send_http_header; With mod_perls 1.24_01 and 1.25 on Apaches 1.3.14 and 1.3.19, this call leaves me with Pragma and Cache-Control headers. Sadly, the nice (but broken as per above) no_cache() behavior of sending those two headers is also undocumented in the mod_perl guide to begin with. Humbly, Andrew -- Andrew Ho http://www.tellme.com/ [EMAIL PROTECTED] Engineer [EMAIL PROTECTED] Voice 650-930-9062 Tellme Networks, Inc. 1-800-555-TELLFax 650-930-9101 --
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.''
RE: no_cache pragma/cache-control headers : confusion
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.''