Permalink
Browse files

make psgix.input.buffered a boolean

  • Loading branch information...
1 parent 0f80c86 commit c5cd8fbd85ce327b54ec037f6db81d3b2d1c6efe @miyagawa committed Feb 10, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Nomo/Server.pm
View
@@ -296,7 +296,8 @@ sub _prepare_env {
$cl -= $read;
$buf->print($chunk);
}
- $env->{'psgix.input.buffered'} = $env->{'psgi.input'} = $buf->rewind;
+ $env->{'psgi.input'} = $buf->rewind;
+ $env->{'psgix.input.buffered'} = 1;
} elsif ($chunked) {
my $buf = Plack::TempBuffer->new;
my $chunk_buffer = '';
@@ -328,7 +329,8 @@ sub _prepare_env {
}
$env->{CONTENT_LENGTH} = $length;
- $env->{'psgix.input.buffered'} = $env->{'psgi.input'} = $buf->rewind;
+ $env->{'psgi.input'} = $buf->rewind;
+ $env->{'psgix.input.buffered'} = 1;
} else {
$env->{'psgi.input'} = Symbol::geniosym;
}

0 comments on commit c5cd8fb

Please sign in to comment.