Browse files

Merge pull request #858 from florolf/devel

_read_to_end: check definedness instead of value
  • Loading branch information...
2 parents 24d7f59 + d318f79 commit cb6e843327ef3496e03dc237c5b44555f5abe8b5 @bigpresh bigpresh committed Nov 12, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Dancer/Request.pm
View
3 lib/Dancer/Request.pm
@@ -495,7 +495,8 @@ sub _read_to_end {
return unless $self->_has_something_to_read();
if ($content_length > 0) {
- while (my $buffer = $self->_read()) {
+ my $buffer;
+ while (defined ($buffer = $self->_read())) {
$self->{body} .= $buffer;
$self->{_http_body}->add($buffer);
}

0 comments on commit cb6e843

Please sign in to comment.