The following commit has been merged in the master branch:
commit 960540827f3a20cae43b661cc1fe82a87de5f1ca
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date: Tue Aug 5 19:52:53 2008 -0300
Packages::DoIndex: Copy the improvements in HTTP headers from ::Dispatcher
diff --git a/lib/Packages/DoIndex.pm b/lib/Packages/DoIndex.pm
index e1c5b6d..21cd164 100644
--- a/lib/Packages/DoIndex.pm
+++ b/lib/Packages/DoIndex.pm
@@ -4,6 +4,7 @@ use strict;
use warnings;
use CGI qw( :cgi );
+use POSIX qw( strftime );
use Exporter;
use Deb::Versions;
@@ -60,7 +61,8 @@ sub send_file {
$headers{'-content-encoding'} = $encoding{$opts->{format}} if
exists $encoding{$opts->{format}};
my ($size,$mtime) = (stat("$wwwdir/$path"))[7,9];
$headers{'-content-length'} = $size;
- $headers{'-last-modified'} = gmtime($mtime);
+ $headers{'-vary'} = 'negotiate,accept-language';
+ $headers{'-last-modified'} = strftime("%a, %d %b %Y %T %z",
localtime($mtime));
print header( %headers );
binmode INDEX;
--
APT Archive Web-Frontend (Alioth repository)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]