about summary refs log tree commit homepage
path: root/lib/PublicInbox/CompressNoop.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-09-10 08:16:53 +0000
committerEric Wong <e@80x24.org>2022-09-10 19:50:25 +0000
commit133c9c61c0fe7e0e2d8d00e9935b3433b806ddc7 (patch)
tree3d8bccc83610cd77f64024244adeb090d4d6bd15 /lib/PublicInbox/CompressNoop.pm
parentbb3e51c9fdaf1059c2ae8368a527b4bd87b0b423 (diff)
downloadpublic-inbox-133c9c61c0fe7e0e2d8d00e9935b3433b806ddc7.tar.gz
This seems like the least disruptive way to allow more use of
->zmore when streaming large messages to sockets.
Diffstat (limited to 'lib/PublicInbox/CompressNoop.pm')
-rw-r--r--lib/PublicInbox/CompressNoop.pm4
1 files changed, 2 insertions, 2 deletions
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 <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # 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;
 }