From 96ccac2b7ba05f4b9a3c47716da27fe9b5a16131 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 6 Jan 2011 16:13:37 -0600 Subject: actually, response bodies need to be arrayrefs --- lib/Plack/Client.pm | 4 ++-- 1 file 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 }, ); }); -- cgit v1.2.3