From bdd25f6c37620759536c4ad84687a9a050732cf8 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Wed, 6 Aug 2008 01:30:39 +0200 Subject: [PATCH] ::Dispatcher/::DoIndex: Add Expires header --- lib/Packages/Dispatcher.pm | 2 ++ lib/Packages/DoIndex.pm | 1 + 2 files changed, 3 insertions(+) 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; -- 2.39.2