Bug in $r->no_cache(1) with mod_expires

Bug in $r->no_cache(1) with mod_expires

am 25.11.2009 17:12:35 von Clinton Gormley

Hi all

I think that the behaviour of $r->no_cache(1) is buggy, when combined
with mod_expires.

I have:

ExpiresDefault "access plus 1 month"
ExpiresActive On

then in my mod_perl code, I call $r->no_cache(1)

The headers that are returned are:

Pragma: no-cache
 Cache-control: no-cache, max-age=864000
 Expires: Sat, 05 Dec 2009 16:08:53 GMT

Firefox doesn't cache this page, but IE6 - 8 does.

If I explicitly set the headers:

$headers->set( 'Pragma', 'no-cache' );
$headers->set( 'Cache-control', 'no-cache' );
$headers->set( 'Expires', -1 );

then I get:
Pragma: no-cache
Cache-control: no-cache
Expires: -1

which works across all browsers.

Could the behaviour of no_cache() be changed to do this instead?

thanks

Clint