diff options
author | Eric Wong <e@80x24.org> | 2016-07-07 01:39:34 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-07-07 01:41:01 +0000 |
commit | 0a1e9e975792489a64d249ed830d709f8e949dc7 (patch) | |
tree | a304e949d9dfc8a29bcd032b0c9a678e0fd47e21 /lib/PublicInbox/GitHTTPBackend.pm | |
parent | c3d3a25a8b1ef916f65891ea2cb0216f184fd405 (diff) | |
download | public-inbox-0a1e9e975792489a64d249ed830d709f8e949dc7.tar.gz |
No need to keep an extra array around for this.
Diffstat (limited to 'lib/PublicInbox/GitHTTPBackend.pm')
-rw-r--r-- | lib/PublicInbox/GitHTTPBackend.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index a9c0e9c7..b684988d 100644 --- a/lib/PublicInbox/GitHTTPBackend.pm +++ b/lib/PublicInbox/GitHTTPBackend.pm @@ -96,8 +96,7 @@ sub serve_dumb { my $f = (ref $git ? $git->{git_dir} : $git) . '/' . $path; return r(404) unless -f $f && -r _; # just in case it's a FIFO :P - my @st = stat(_); - my $size = $st[7]; + my $size = -s _; # TODO: If-Modified-Since and Last-Modified? open my $in, '<', $f or return r(404); |