]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/ViewVCS.pm
viewvcs: stream_blob_parse_hdr: fix BIN_DETECT retries
[public-inbox.git] / lib / PublicInbox / ViewVCS.pm
index 6714e67cdabf6556c97aca3b40e0c48c94332040..9ec04f480a09abb628405ec47cfe3a816c54476d 100644 (file)
@@ -18,7 +18,7 @@ use strict;
 use warnings;
 use bytes (); # only for bytes::length
 use PublicInbox::SolverGit;
-use PublicInbox::WwwStream;
+use PublicInbox::WwwStream qw(html_oneshot);
 use PublicInbox::Linkify;
 use PublicInbox::Tmpfile;
 use PublicInbox::Hval qw(ascii_html to_filename);
@@ -35,7 +35,7 @@ sub html_page ($$$) {
        my ($ctx, $code, $strref) = @_;
        my $wcb = delete $ctx->{-wcb};
        $ctx->{-upfx} = '../../'; # from "/$INBOX/$OID/s/"
-       my $res = PublicInbox::WwwStream::oneshot($ctx, $code, $strref);
+       my $res = html_oneshot($ctx, $code, $strref);
        $wcb ? $wcb->($res) : $res;
 }
 
@@ -58,6 +58,7 @@ sub stream_blob_parse_hdr { # {parse_hdr} for Qspawn
                        warn "premature EOF on $oid $$logref\n";
                        return html_page($ctx, 500, $logref);
                }
+               @$ctx{qw(-res -logref)} = ($res, $logref);
                undef; # bref keeps growing
        }
 }