diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/RepoAtom.pm | 4 | ||||
-rw-r--r-- | lib/PublicInbox/WwwCoderepo.pm | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/RepoAtom.pm b/lib/PublicInbox/RepoAtom.pm index c1649d0a..ab0f2fcc 100644 --- a/lib/PublicInbox/RepoAtom.pm +++ b/lib/PublicInbox/RepoAtom.pm @@ -43,7 +43,7 @@ sub zflush { $_[0]->SUPER::zflush('</feed>') } # called by GzipFilter->write or GetlineResponse->getline sub translate { my $self = shift; - my $rec = $_[0] // return $self->zflush; # getline + $_[0] // return zflush($self); # getline caller my @out; my $lbuf = delete($self->{lbuf}) // shift; $lbuf .= shift while @_; @@ -87,7 +87,7 @@ xmlns="http://www.w3.org/1999/xhtml"><pre style="white-space:pre-wrap"> } $self->{lbuf} = $lbuf; chomp @out; - $self->SUPER::translate(@out); + @out ? $self->SUPER::translate(@out) : ''; # not EOF, yet } # $REPO/tags.atom endpoint diff --git a/lib/PublicInbox/WwwCoderepo.pm b/lib/PublicInbox/WwwCoderepo.pm index d1354af5..3814f719 100644 --- a/lib/PublicInbox/WwwCoderepo.pm +++ b/lib/PublicInbox/WwwCoderepo.pm @@ -273,7 +273,7 @@ sub zflush { $_[0]->SUPER::zflush('</pre>', $_[0]->_html_end) } # called by GzipFilter->write or GetlineResponse->getline sub translate { my $ctx = shift; - my $rec = $_[0] // return zflush($ctx); # getline + $_[0] // return zflush($ctx); # getline caller my @out; my $fbuf = delete($ctx->{fbuf}) // shift; $fbuf .= shift while @_; @@ -290,8 +290,8 @@ sub translate { $snap_pfx, @snap_fmt); } } - $ctx->{fbuf} = $fbuf; - $ctx->SUPER::translate(@out); + $ctx->{fbuf} = $fbuf; # may be incomplete + @out ? $ctx->SUPER::translate(@out) : ''; # not EOF, yet } sub _refs_parse_hdr { # {parse_hdr} for Qspawn |