From acf44d5b9b15366839fac63cc15e1b2b9d5d8369 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 30 Dec 2010 16:40:05 -0600 Subject: make sure CONTENT_LENGTH is set - this feels wrong --- lib/Plack/Client.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/Plack/Client.pm b/lib/Plack/Client.pm index 93cf532..f9482b6 100644 --- a/lib/Plack/Client.pm +++ b/lib/Plack/Client.pm @@ -52,6 +52,7 @@ sub request { die 'XXX' unless $app; my $env = $req->isa('HTTP::Request') ? $req->to_psgi : $req->env; + $env->{CONTENT_LENGTH} ||= length($req->content); # XXX: ??? my $psgi_res = $app->($env); if (ref($psgi_res) eq 'CODE') { my $body = ''; -- cgit v1.2.3-54-g00ecf