perl/modules/WebService/Validator/Feed/lib/WebService/Validator/Feed W3C.pm,1.6,1.7

Update of /sources/public/perl/modules/WebService/Validator/Feed/lib/WebService/Validator/Feed
In directory hutz:/tmp/cvs-serv27024/lib/WebService/Validator/Feed

Modified Files:
	W3C.pm 
Log Message:
using POST instead of GET as a workaround for 'Request-URI Too Large' issue + test suite improvements, both courtesy of Stephen Rushe

Index: W3C.pm
===================================================================
RCS file: /sources/public/perl/modules/WebService/Validator/Feed/lib/WebService/Validator/Feed/W3C.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- W3C.pm	19 Jan 2007 06:39:17 -0000	1.6
+++ W3C.pm	23 Jan 2009 20:46:00 -0000	1.7
@@ -7,9 +7,10 @@
 use URI qw//;
 use URI::QueryParam qw//;
 use Carp qw//;
+use HTTP::Request::Common;
 use base qw/Class::Accessor/;
 
-our $VERSION = "0.5";
+our $VERSION = "0.6";
 
 __PACKAGE__->mk_accessors    qw/user_agent validator_uri/;
 __PACKAGE__->mk_ro_accessors qw/response request_uri som success/;
@@ -90,26 +91,21 @@
 
     $self->{'success'} = 0;
     
-    # 
+    my $req;
     if (defined $parm{string}) {
-        $uri->query_param( rawdata => $parm{string});
-        $uri->query_param( manual => 1);
+        $req = POST $uri, [ rawdata => $parm{string}, manual  => 1, output  => "soap12" ];
     } elsif (defined $parm{uri}) {
         $uri->query_param(url => $parm{uri});
+        $uri->query_param(output => "soap12");
+        $req = GET $uri;
     } else {
         Carp::croak "you must supply a string/uri parameter\n";
     }
 
-    
-    # request SOAP 1.2 output
-    $uri->query_param(output => "soap12");
-    
+        
     # memorize request uri
     $self->{'request_uri'} = $uri;
     
-    # generate new HTTP::Request object
-    my $req = HTTP::Request->new(GET => $uri);
-        
     my $res = $ua->simple_request($req);
     
     # memorize response

Received on Friday, 23 January 2009 20:46:12 UTC