diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-01-06 16:13:37 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-01-06 16:13:37 -0600 |
commit | 96ccac2b7ba05f4b9a3c47716da27fe9b5a16131 (patch) | |
tree | faa236ea5bd1a6802d6d6f1e5917fb39f51527b3 | |
parent | 01862345f8bc919626c6cf92129490a643802ac2 (diff) | |
download | plack-client-96ccac2b7ba05f4b9a3c47716da27fe9b5a16131.tar.gz plack-client-96ccac2b7ba05f4b9a3c47716da27fe9b5a16131.zip |
actually, response bodies need to be arrayrefs
-rw-r--r-- | lib/Plack/Client.pm | 4 |
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 }, ); }); |