From 4746f5d682f63f35eab73da9f7ff47138809b9bc Mon Sep 17 00:00:00 2001 From: Justin Hunter Date: Mon, 28 Feb 2011 17:18:55 -0800 Subject: fix for undef bodies --- lib/Reaction/UI/Window.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Reaction/UI/Window.pm b/lib/Reaction/UI/Window.pm index 0289b39..be82198 100644 --- a/lib/Reaction/UI/Window.pm +++ b/lib/Reaction/UI/Window.pm @@ -28,7 +28,7 @@ sub _build_view { sub flush { my ($self) = @_; my $res = $self->ctx->res; - if ( $res->status =~ /^3/ || length($res->body) ) { + if ( $res->status =~ /^3/ || ( defined $res->body && length($res->body) ) ) { $res->content_type('text/plain') unless $res->content_type; return; } -- cgit v1.2.3