Require HTTP::Body 0.9, added a few tests to check that blank params work properly
Andy Grundman [Tue, 27 Mar 2007 18:34:35 +0000 (18:34 +0000)]
Changes
Makefile.PL
t/live_engine_request_parameters.t

diff --git a/Changes b/Changes
index 33dff3b..91bcbf4 100644 (file)
--- a/Changes
+++ b/Changes
@@ -4,8 +4,10 @@ This file documents the revision history for Perl extension Catalyst.
         - Sending SIGHUP to the dev server will now cause it to restart.
         - Allow "0" for a path in uri_for.
         - Performance improvements to uri_for by inlining encoding.
-        - Updated HTTP::Body dependency to 0.8 to handle the case where IE sometimes
-          sends an extra CRLF after a POST body.
+        - Updated HTTP::Body dependency to 0.9 which fixes the following issues:
+          * Handle when IE sometimes sends an extra CRLF after the POST body.
+          * Empty fields in multipart/form-data POSTs are no longer ignored.
+          * Uploaded files with the name "0" are no longer ignored.
 
 5.7007  2007-03-13 14:18:00
         - Performance and stability improvements to the built-in HTTP server.
index f9b9b7c..5d25050 100644 (file)
@@ -14,7 +14,7 @@ requires 'CGI::Simple::Cookie';
 requires 'Data::Dump';
 requires 'File::Modified';
 requires 'HTML::Entities';
-requires 'HTTP::Body'    => '0.8';
+requires 'HTTP::Body'    => '0.9';
 requires 'HTTP::Headers' => '1.64';
 requires 'HTTP::Request';
 requires 'HTTP::Response';
index b0c8867..b677dc2 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use FindBin;
 use lib "$FindBin::Bin/lib";
 
-use Test::More tests => 28;
+use Test::More tests => 29;
 use Catalyst::Test 'TestApp';
 
 use Catalyst::Request;
@@ -41,8 +41,9 @@ use URI;
     my $creq;
 
     my $parameters = {
-        'a' => [qw(A b C d E f G)],
-        '%' => [ '%', '"', '& - &' ],
+        'a'     => [qw(A b C d E f G)],
+        '%'     => [ '%', '"', '& - &' ],
+        'blank' => '',
     };
 
     my $request = POST(
@@ -78,7 +79,8 @@ use URI;
     my $creq;
 
     my $parameters = {
-        'url' => 'http://www.google.com',
+        'url'   => 'http://www.google.com',
+        'blank' => '',
     };
 
     my $request = POST( 'http://localhost/dump/request',
@@ -96,7 +98,8 @@ use URI;
     my $creq;
     
     my $parameters = {
-        a => 1,
+        a     => 1,
+        blank => '',
     };
 
     my $request = POST(
@@ -108,6 +111,7 @@ use URI;
     ok( my $response = request($request), 'Request' );
     ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' );
     is( $creq->{uri}->query, 'query_string', 'Catalyst::Request POST query_string' );
+    is_deeply( $creq->{parameters}, $parameters, 'Catalyst::Request parameters' );
     
     ok( $response = request('http://localhost/dump/request/a/b?x=1&y=1&z=1'), 'Request' );
     ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' );