On Fri, 4 Oct 2002, Paul Simon wrote:

> On Thu, 3 Oct 2002, Paul Simon wrote:

>> I'm still having problems with sending an Expires in the
>> header.  You mentioned, "Apache will send one for you, based
>> on, in particular, the DefaultType setting."

>> Can I configure the DefaultType in apache?

Yes, you can - look at the Apache documentation for the
syntax. "DefaultType" refers to the default mime type that
that apache will use for a request if it can't otherwise
determine one (such as from a file extension). 

> Ok. I answered my own question, using mod_expires.  A little off OT...

Not too OT for mod_perl - see
http://perl.apache.org/docs/general/correct_headers/correct_headers.html
for a discussion. For sending the Expires header yourself in a 
script, using mod_perl-2, you can do

my $expires = Apache::Util::ht_time(time + 180*24*60*60);
print <<"END";
Expires: $expires
Content-type: text/html\n\n
whatever_else
END

which would require
   PerlOptions +ParseHeaders
in the relevant section of httpd.conf.

-- 
best regards,
randy 

Reply via email to