DOH! do more than one read, if necessary.
Florian Ragwitz [Fri, 21 Aug 2009 20:55:25 +0000 (20:55 +0000)]
lib/Catalyst/Engine.pm

index 4271aae..9190d9a 100644 (file)
@@ -50,7 +50,7 @@ sub finalize_body {
     if ( blessed($body) && $body->can('read') or ref($body) eq 'GLOB' ) {
         my $got;
         do {
-            read $body, my ($buffer), $CHUNKSIZE;
+            $got = read $body, my ($buffer), $CHUNKSIZE;
             last unless $self->write( $c, $buffer );
         } while $got > 0;