summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Web/Request.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Web/Request.pm b/lib/Web/Request.pm
index 6fb94a3..0f37610 100644
--- a/lib/Web/Request.pm
+++ b/lib/Web/Request.pm
@@ -188,8 +188,11 @@ has _parsed_body => (
my $ct = $self->content_type;
my $cl = $self->content_length;
if (!$ct && !$cl) {
+ if (!$self->env->{'psgix.input.buffered'}) {
+ $self->env->{'psgix.input.buffered'} = 1;
+ $self->env->{'psgi.input'} = Stream::Buffered->new(0)->rewind;
+ }
return {
- content => '',
body => {},
uploads => {},
};