diff options
author | Eric Wong <e@80x24.org> | 2016-05-22 06:17:30 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-05-22 07:28:19 +0000 |
commit | d644f8903b8dd4f9765fd0f88cc8e0d9fa5f6a5e (patch) | |
tree | 17ad86aebc19ede995f7342c4470aa6ae72f6ebc /lib | |
parent | 5fd049f32fde94f53f431ae3f37143440ee0cf09 (diff) | |
download | public-inbox-d644f8903b8dd4f9765fd0f88cc8e0d9fa5f6a5e.tar.gz |
This can avoid an expensive copy for big strings.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/HTTP.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm index 6576bf68..4eb14481 100644 --- a/lib/PublicInbox/HTTP.pm +++ b/lib/PublicInbox/HTTP.pm @@ -200,7 +200,7 @@ sub response_write { my $alive = response_header_write($self, $env, $res); # middlewares such as Deflater may write empty strings - my $write = sub { $self->write($_[0]) if $_[0] ne '' }; + my $write = sub { $self->write(\($_[0])) if $_[0] ne '' }; my $close = sub { if ($alive) { $self->event_write; # watch for readability if done |