Permalink
Browse files

run perlbal test server only once: skip close test if the server proc…

…ess is separate
  • Loading branch information...
miyagawa committed Sep 26, 2009
1 parent 26385c7 commit 198461589afc95d8e184df2ee00040ebba09410b
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/Perlbal/Plugin/PSGI.pm
@@ -36,11 +36,12 @@ sub handle_request {
parse_http_request($pb->{headers_string}, $env);
- if ($env->{REQUEST_METHOD} eq 'POST') {
- my $buf_ref = $pb->read($env->{CONTENT_LENGTH}) || \"";
- open my $input, "<", $buf_ref;
- $env->{'psgi.input'} = $input;
+ my $buf_ref = \"";
+ if ($env->{CONTENT_LENGTH}) {
+ $buf_ref = $pb->read($env->{CONTENT_LENGTH}) || \"";
}
+ open my $input, "<", $buf_ref;
+ $env->{'psgi.input'} = $input;
my $res = Plack::Util::run_app $app, $env;

0 comments on commit 1984615

Please sign in to comment.