[Catalyst-commits] r7583 - in trunk/HTTP-Body: . lib/HTTP
lib/HTTP/Body t/data/xforms
andyg at dev.catalyst.perl.org
andyg at dev.catalyst.perl.org
Mon Apr 7 13:17:41 BST 2008
Author: andyg
Date: 2008-04-07 13:17:40 +0100 (Mon, 07 Apr 2008)
New Revision: 7583
Modified:
trunk/HTTP-Body/Changes
trunk/HTTP-Body/lib/HTTP/Body.pm
trunk/HTTP-Body/lib/HTTP/Body/XForms.pm
trunk/HTTP-Body/lib/HTTP/Body/XFormsMultipart.pm
trunk/HTTP-Body/t/data/xforms/001-results.yml
trunk/HTTP-Body/t/data/xforms/002-results.yml
Log:
HTTP::Body 1.03, patch from ruoso to set body data for XForms
Modified: trunk/HTTP-Body/Changes
===================================================================
--- trunk/HTTP-Body/Changes 2008-04-07 10:56:50 UTC (rev 7582)
+++ trunk/HTTP-Body/Changes 2008-04-07 12:17:40 UTC (rev 7583)
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension HTTP::Body.
+1.03 2008-04-07 08:20:00
+ - Set body value for XForms data. (Daniel Ruoso)
+
1.02 2008-02-27 17:30:00
- Fixed issue with urlencoded test on Windows.
Modified: trunk/HTTP-Body/lib/HTTP/Body/XForms.pm
===================================================================
--- trunk/HTTP-Body/lib/HTTP/Body/XForms.pm 2008-04-07 10:56:50 UTC (rev 7582)
+++ trunk/HTTP-Body/lib/HTTP/Body/XForms.pm 2008-04-07 12:17:40 UTC (rev 7583)
@@ -34,12 +34,12 @@
sub spin {
my $self = shift;
-
+
+ $self->body($self->{buffer});
$self->param( 'XForms:Model', $self->{buffer} );
-
$self->{buffer} = '';
$self->{state} = 'done';
-
+
return $self->SUPER::init();
}
Modified: trunk/HTTP-Body/lib/HTTP/Body/XFormsMultipart.pm
===================================================================
--- trunk/HTTP-Body/lib/HTTP/Body/XFormsMultipart.pm 2008-04-07 10:56:50 UTC (rev 7582)
+++ trunk/HTTP-Body/lib/HTTP/Body/XFormsMultipart.pm 2008-04-07 12:17:40 UTC (rev 7583)
@@ -74,6 +74,9 @@
if ( $contentid eq $self->start ) {
$part->{name} = 'XForms:Model';
+ if ($part->{done}) {
+ $self->body($part->{data});
+ }
}
elsif ( defined $contentid ) {
$part->{name} = $contentid;
Modified: trunk/HTTP-Body/lib/HTTP/Body.pm
===================================================================
--- trunk/HTTP-Body/lib/HTTP/Body.pm 2008-04-07 10:56:50 UTC (rev 7582)
+++ trunk/HTTP-Body/lib/HTTP/Body.pm 2008-04-07 12:17:40 UTC (rev 7583)
@@ -4,7 +4,7 @@
use Carp qw[ ];
-our $VERSION = '1.02';
+our $VERSION = '1.03';
our $TYPES = {
'application/octet-stream' => 'HTTP::Body::OctetStream',
Modified: trunk/HTTP-Body/t/data/xforms/001-results.yml
===================================================================
--- trunk/HTTP-Body/t/data/xforms/001-results.yml 2008-04-07 10:56:50 UTC (rev 7582)
+++ trunk/HTTP-Body/t/data/xforms/001-results.yml 2008-04-07 12:17:40 UTC (rev 7583)
@@ -1,5 +1,5 @@
---
-body: ~
+body: <model><data1>asdfg</data1><data2>asdfg</data2></model>
start: asdfg at asdfg.com
param:
XForms:Model: <model><data1>asdfg</data1><data2>asdfg</data2></model>
Modified: trunk/HTTP-Body/t/data/xforms/002-results.yml
===================================================================
--- trunk/HTTP-Body/t/data/xforms/002-results.yml 2008-04-07 10:56:50 UTC (rev 7582)
+++ trunk/HTTP-Body/t/data/xforms/002-results.yml 2008-04-07 12:17:40 UTC (rev 7583)
@@ -1,5 +1,5 @@
---
-body: ~
+body: <model><data1>asdfg</data1><data2>asdfg</data2></model>
param:
XForms:Model: <model><data1>asdfg</data1><data2>asdfg</data2></model>
upload: {}
More information about the Catalyst-commits
mailing list