From: Frank Lichtenheld Date: Sat, 8 Sep 2007 22:28:55 +0000 (+0200) Subject: Packages::DoIndex: Send Content-Length and Last-Modified X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=c3b6d74d1bcb22d6eb92e2b0bb8a897c0fb03d0f;p=deb%2Fpackages.git Packages::DoIndex: Send Content-Length and Last-Modified --- diff --git a/lib/Packages/DoIndex.pm b/lib/Packages/DoIndex.pm index 8f96fdf..0c5d89d 100644 --- a/lib/Packages/DoIndex.pm +++ b/lib/Packages/DoIndex.pm @@ -55,6 +55,9 @@ sub send_file { $headers{'-charset'} = get_charset( $opts->{lang} ); $headers{'-type'} = get_mime( $opts->{format}, 'text/plain' ); $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); print header( %headers ); binmode INDEX;