From 576be6d4604f41520851eea1fbc27777ea0c24ce Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 5 Jan 2011 16:07:34 -0600 Subject: probably want to add Content-Length here too --- lib/Plack/Client.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Plack/Client.pm b/lib/Plack/Client.pm index 82630f8..d97f44c 100644 --- a/lib/Plack/Client.pm +++ b/lib/Plack/Client.pm @@ -5,6 +5,7 @@ use warnings; use HTTP::Message::PSGI; use HTTP::Request; use Plack::App::Proxy; +use Plack::Middleware::ContentLength; use Plack::Response; use Scalar::Util qw(blessed); @@ -42,6 +43,7 @@ sub request { if ($scheme eq 'psgi-local') { $req->uri->path('/') unless length $req->uri->path; $app = $self->app_for($req->uri->authority); + $app = Plack::Middleware::ContentLength->wrap($app); } elsif ($scheme eq 'http' || $scheme eq 'https') { my $uri = $req->uri->clone; -- cgit v1.2.3