From 133c9c61c0fe7e0e2d8d00e9935b3433b806ddc7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 10 Sep 2022 08:16:53 +0000 Subject: www: gzip_filter: implicitly flush {obuf} on zmore/zflush This seems like the least disruptive way to allow more use of ->zmore when streaming large messages to sockets. --- lib/PublicInbox/CompressNoop.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/CompressNoop.pm') diff --git a/lib/PublicInbox/CompressNoop.pm b/lib/PublicInbox/CompressNoop.pm index e3301473..5135299f 100644 --- a/lib/PublicInbox/CompressNoop.pm +++ b/lib/PublicInbox/CompressNoop.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2020-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # Provide the same methods as Compress::Raw::Zlib::Deflate but @@ -10,7 +10,7 @@ use Compress::Raw::Zlib qw(Z_OK); sub new { bless \(my $self), __PACKAGE__ } sub deflate { # ($self, $input, $output) - $_[2] .= $_[1]; + $_[2] .= ref($_[1]) ? ${$_[1]} : $_[1]; Z_OK; } -- cgit v1.2.3-24-ge0c7