summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-01-05 16:07:34 -0600
committerJesse Luehrs <doy@tozt.net>2011-01-05 16:07:34 -0600
commit576be6d4604f41520851eea1fbc27777ea0c24ce (patch)
treeac8c719733eeffd344d6aa2fe7e2f761fef3c3de
parentdc5313d113245c8588e5bc4fab8a169bef607f7c (diff)
downloadplack-client-576be6d4604f41520851eea1fbc27777ea0c24ce.tar.gz
plack-client-576be6d4604f41520851eea1fbc27777ea0c24ce.zip
probably want to add Content-Length here too
-rw-r--r--lib/Plack/Client.pm2
1 files changed, 2 insertions, 0 deletions
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;