- my $deflated = \($zin->[1]);
- my $r = $self->SUPER::do_read($deflated, $len) or return;
+ my $doff;
+ my $dbuf = delete($self->{dbuf}) // '';
+ $doff = length($dbuf);
+ my $r = PublicInbox::DS::do_read($self, \$dbuf, $len, $doff) or return;
+
+ # Workaround inflate bug appending to OOK scalars:
+ # <https://rt.cpan.org/Ticket/Display.html?id=132734>
+ # We only have $off if the client is pipelining, and pipelining
+ # is where our substr() OOK optimization in event_step makes sense.
+ if ($off) {
+ my $copy = $$rbuf;
+ undef $$rbuf;
+ $$rbuf = $copy;
+ }