]> git.deb.at Git - deb/packages.git/commitdiff
::Dispatcher/::DoIndex: Add Expires header
authorFrank Lichtenheld <frank@lichtenheld.de>
Tue, 5 Aug 2008 23:30:39 +0000 (01:30 +0200)
committerFrank Lichtenheld <frank@lichtenheld.de>
Tue, 5 Aug 2008 23:30:39 +0000 (01:30 +0200)
lib/Packages/Dispatcher.pm
lib/Packages/DoIndex.pm

index a90c47ff55646df4b82d7fcf8de489ead2d54a0e..e8f0679434c67c55cb41a4f4494f03c09f2e6763 100755 (executable)
@@ -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 '<pre>'.Dumper(\%ENV, \%page_content, get_all_messages()).'</pre>';
index 21cd164077bedb78b7c4fc12d662e16f8faf9fe2..5aba6b3b0dc69588320b50a6e0210db114cede79 100644 (file)
@@ -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;