about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/ViewVCS.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm
index b41adc44..962dc66b 100644
--- a/lib/PublicInbox/ViewVCS.pm
+++ b/lib/PublicInbox/ViewVCS.pm
@@ -135,14 +135,14 @@ sub solve_result {
                 return html_page($ctx, 500, \$log);
         }
 
-        my $binary = index($$blob, "\0") >= 0;
+        my $bin = index(substr($$blob, 0, $BIN_DETECT), "\0") >= 0;
         if (defined $fn) {
                 my $h = [ 'Content-Length', $size, 'Content-Type' ];
-                push(@$h, ($binary ? 'application/octet-stream' : 'text/plain'));
+                push(@$h, ($bin ? 'application/octet-stream' : 'text/plain'));
                 return delete($ctx->{-wcb})->([200, $h, [ $$blob ]]);
         }
 
-        if ($binary) {
+        if ($bin) {
                 $log = "<pre>$oid $type $size bytes (binary)" .
                         " $raw_link</pre>" . $log;
                 return html_page($ctx, 200, \$log);