Changing default behavior of upload handling to stop taking over the upload extension...
[catagits/HTTP-Body.git] / lib / HTTP / Body / XFormsMultipart.pm
index 20a3693..4b4c9f3 100644 (file)
@@ -30,7 +30,7 @@ parameter XForms:Model.
 
 =item init
 
-This function is overrided to detect the start part of the
+This function is overridden to detect the start part of the
 multipart/related post.
 
 =cut
@@ -60,7 +60,7 @@ sub start {
 
 =item handler
 
-This function is overrided to differ the start part, which should be
+This function is overridden to differ the start part, which should be
 set as the XForms:Model param if its content type is application/xml.
 
 =cut
@@ -74,6 +74,9 @@ sub handler {
     
     if ( $contentid eq $self->start ) {
         $part->{name} = 'XForms:Model';
+        if ($part->{done}) {
+            $self->body($part->{data});
+        }
     }
     elsif ( defined $contentid ) {
         $part->{name}     = $contentid;
@@ -85,6 +88,10 @@ sub handler {
 
 =back
 
+=head1 SUPPORT
+
+See L<HTTP::Body>
+
 =head1 AUTHOR
 
 Daniel Ruoso C<daniel@ruoso.com>