Skip to content

Commit

Permalink
use ContentLength middleware in Servers that want Content-Length
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Oct 13, 2009
1 parent 683fc79 commit dca9ea0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Plack/Server/AnyEvent.pm
Expand Up @@ -8,6 +8,7 @@ use AnyEvent::Socket;
use Plack::Util;
use HTTP::Status;
use Plack::HTTPParser qw(parse_http_request);
use Plack::Middleware::ContentLength;
use IO::Handle;
use Errno ();
use Scalar::Util ();
Expand Down Expand Up @@ -125,6 +126,7 @@ sub _response_handler {

return sub {
my($app, $env) = @_;
$app = Plack::Middleware::ContentLength->wrap($app);
my $res = Plack::Util::run_app $app, $env;
return if scalar(@$res) == 0;

Expand Down

0 comments on commit dca9ea0

Please sign in to comment.