summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-12-30 16:40:05 -0600
committerJesse Luehrs <doy@tozt.net>2010-12-30 16:40:05 -0600
commitacf44d5b9b15366839fac63cc15e1b2b9d5d8369 (patch)
tree6e49b9608334dc274142a72cccddb0219309c28b /lib
parentdbb8f20d7bb8a24e12a2d451de1c1a1e50934a6c (diff)
downloadplack-client-acf44d5b9b15366839fac63cc15e1b2b9d5d8369.tar.gz
plack-client-acf44d5b9b15366839fac63cc15e1b2b9d5d8369.zip
make sure CONTENT_LENGTH is set - this feels wrong
Diffstat (limited to 'lib')
-rw-r--r--lib/Plack/Client.pm1
1 files changed, 1 insertions, 0 deletions
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 = '';