about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/GitHTTPBackend.pm3
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);