projects
/
deb
/
packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3e5238
)
Packages::DoIndex: Send Content-Length and Last-Modified
author
Frank Lichtenheld
<frank@lichtenheld.de>
Sat, 8 Sep 2007 22:28:55 +0000
(
00:28
+0200)
committer
Frank Lichtenheld
<frank@lichtenheld.de>
Sun, 9 Sep 2007 01:02:37 +0000
(
03:02
+0200)
lib/Packages/DoIndex.pm
patch
|
blob
|
history
diff --git
a/lib/Packages/DoIndex.pm
b/lib/Packages/DoIndex.pm
index 8f96fdf8b20ef6f79a4353480bfca06c3ebc3f9d..0c5d89dfa57ef48a618b0e423facb5e115843236 100644
(file)
--- 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;