Tom Lancaster wrote:
Hi,

I'm having some problems trying to set the Cache-Control header using
Apache::ASP. The only values I can get it to hold are 'public' and
private'.

I've tried using $Response->{CacheControl} = 'max-age=1800,no-cache="Set-Cookie"';

and

$Response->AddHeader('Cache-Control',
'max-age=1800,no-cache="Set-Cookie"');


This should have worked fine. I just tried a test script:


#### TEST SCRUIPT
<%
$Response->{CacheControl} = 'max-age=1800,no-cache="Set-Cookie"';
%>

test
#################

and the output was:

[EMAIL PROTECTED] job]$ lwp-request -ed http://gate:81/asp/eg/cache_control.asp
Cache-Control: max-age=1800,no-cache="Set-Cookie"
Connection: close
Date: Sun, 23 Feb 2003 23:56:28 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3 mod_fastcgi/2.2.12 mod_perl/1.27 mod_ssl/2.8.11 
OpenSSL/0.9.6g
Content-Length: 64
Content-Type: text/html
Client-Date: Sun, 23 Feb 2003 23:56:28 GMT
Client-Peer: 192.168.0.10:81
Set-Cookie: session-id=0b3a8dc86173ab6b01d215064498ebad; path=/

The default output for the Cache-Control header is "private"
so I find it odd that you are getting public in your tests.

Is Apache::ASP munging these values somehow ? I couldn't see it doing so
in the source. What am I missing ?

Apache::ASP just uses the $Response->{CacheControl} member to set Cache-Control header like this in Apache::ASP::Response:

    # do the Cache-Control header
    $r->header_out('Cache-Control', $self->{CacheControl});

I am not sure what is wrong in your app.  Is it possible
that there is a "public" value being set somewhere in your
global ASP code?  Maybe in Script_OnEnd or something?

Regards,

Josh

________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to