Changing default behavior of upload handling to stop taking over the upload extension...
[catagits/HTTP-Body.git] / lib / HTTP / Body / XForms.pm
index 6365621..d0903d4 100644 (file)
@@ -34,17 +34,23 @@ the buffer content.
 
 sub spin {
     my $self = shift;
-    
+
+    return unless $self->length == $self->content_length;
+
+    $self->body($self->{buffer});
     $self->param( 'XForms:Model', $self->{buffer} );
-    
     $self->{buffer} = '';
     $self->{state}  = 'done';
-    
+
     return $self->SUPER::init();
 }
 
 =back
 
+=head1 SUPPORT
+
+See L<HTTP::Body>
+
 =head1 AUTHOR
 
 Daniel Ruoso, C<daniel@ruoso.com>