From: Frank Lichtenheld Date: Tue, 5 Aug 2008 23:30:39 +0000 (+0200) Subject: ::Dispatcher/::DoIndex: Add Expires header X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=bdd25f6c37620759536c4ad84687a9a050732cf8;p=deb%2Fpackages.git ::Dispatcher/::DoIndex: Add Expires header --- diff --git a/lib/Packages/Dispatcher.pm b/lib/Packages/Dispatcher.pm index a90c47f..e8f0679 100755 --- a/lib/Packages/Dispatcher.pm +++ b/lib/Packages/Dispatcher.pm @@ -350,6 +350,8 @@ sub do_dispatch { -vary => 'negotiate,accept-language', -last_modified => strftime("%a, %d %b %Y %T %z", localtime($last_modified)), + -expires => strftime("%a, %d %b %Y %T %z", + localtime($last_modified + (12*3600))), ); #use Data::Dumper; #print '
'.Dumper(\%ENV, \%page_content, get_all_messages()).'
'; diff --git a/lib/Packages/DoIndex.pm b/lib/Packages/DoIndex.pm index 21cd164..5aba6b3 100644 --- a/lib/Packages/DoIndex.pm +++ b/lib/Packages/DoIndex.pm @@ -63,6 +63,7 @@ sub send_file { $headers{'-content-length'} = $size; $headers{'-vary'} = 'negotiate,accept-language'; $headers{'-last-modified'} = strftime("%a, %d %b %Y %T %z", localtime($mtime)); + $headers{'-expires'} = strftime("%a, %d %b %Y %T %z", localtime($mtime+(12*3600))); print header( %headers ); binmode INDEX;