summaryrefslogtreecommitdiffstats
path: root/lib/Plack/Client.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Plack/Client.pm')
-rw-r--r--lib/Plack/Client.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Plack/Client.pm b/lib/Plack/Client.pm
index 80824d8..17174e9 100644
--- a/lib/Plack/Client.pm
+++ b/lib/Plack/Client.pm
@@ -162,11 +162,11 @@ sub _resolve_response {
my ($psgi_res) = @_;
if (ref($psgi_res) eq 'CODE') {
- my $body = '';
+ my $body = [];
$psgi_res->(sub {
$psgi_res = shift;
return Plack::Util::inline_object(
- write => sub { $body .= $_[0] },
+ write => sub { push @$body, $_[0] },
close => sub { push @$psgi_res, $body },
);
});