Skip to content

Commit

Permalink
Fix content filter in ErrorDocument
Browse files Browse the repository at this point in the history
The content filter in ErrorDocument never set the $done variable to a
true value in the non-subrequest case. As a result, it kept returning
empty strings at the end of input, not undef like it should. This is
actually harmless because response_cb copes with this behavior.
  • Loading branch information
nwellnhof committed Oct 18, 2014
1 parent 514b2e4 commit afcd72c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Plack/Middleware/ErrorDocument.pm
Expand Up @@ -72,9 +72,9 @@ sub call {
my $done;
return sub {
unless ($done) {
$done = 1;
return join '', <$fh>;
}
$done = 1;
return defined $_[0] ? '' : undef;
};
};
Expand Down

0 comments on commit afcd72c

Please sign in to comment.