Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

0.716

  • Loading branch information...
commit 086aa7cf66417832e9094bbef5369e39810ea14e 1 parent 12fad66
Fred Moyer authored
10 Changes
View
@@ -15,7 +15,15 @@ http://rt.cpan.org/Public/Dist/Display.html?Name=SOAP-Lite
-----------------------------------------------------------------------
THIS RELEASE
-----------------------------------------------------------------------
-0.716
+
+
+0.716 May 10, 2013
+ ! #17275 Client unable to detect fatal SOAP failure (e.g. unable to connect to host)
+ ! #81471 Force array context for correct Apache header parsing in SOAP::Transport::HTTP
+ ! #45611 deserializing SOAP message with composite attachment raises exception
+ ! #84168 Test t/02-payload.t fails under Perl 5.17.10
+ ! #85098 Monkey patch for LWP::Protocol confuses the toolchain
+ ! #78692 / #84724 / #83715 Sending large object (many levels deep) throws error Incorrect parameter
! #78502 t/08-schema.t noisy under 5.17.2 (unescaped left brace in regex is deprecated)
! #78608 Documentation for "+trace"
! #78639 Spelling error reported by Debian tools
2  lib/Apache/SOAP.pm
View
@@ -15,7 +15,7 @@ use vars qw(@ISA $VERSION);
use SOAP::Transport::HTTP;
@ISA = qw(SOAP::Transport::HTTP::Apache);
-our $VERSION = 0.715;
+our $VERSION = 0.716;
my $server = __PACKAGE__->new;
2  lib/Apache/XMLRPC/Lite.pm
View
@@ -16,7 +16,7 @@ use XMLRPC::Transport::HTTP;
@ISA = qw(XMLRPC::Transport::HTTP::Apache);
-our $VERSION = 0.715;
+our $VERSION = 0.716;
my $server = __PACKAGE__->new;
2  lib/SOAP/Constants.pm
View
@@ -12,7 +12,7 @@ package SOAP::Constants;
use strict;
use SOAP::Lite;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use constant URI_1999_SCHEMA_XSD => "http://www.w3.org/1999/XMLSchema";
use constant URI_1999_SCHEMA_XSI => "http://www.w3.org/1999/XMLSchema-instance";
4 lib/SOAP/Lite.pm
View
@@ -18,7 +18,7 @@ package SOAP::Lite;
use 5.006; #weak references require perl 5.6
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
# ======================================================================
package SOAP::XMLSchemaApacheSOAP::Deserializer;
@@ -1990,7 +1990,7 @@ sub match {
sub _traverse {
my ($self, $pointer, $itself, $path, @path) = @_;
- die "Incorrect parameter" unless $itself =~/^\d$/;
+ die "Incorrect parameter" unless $itself =~/^\d+$/;
if ($path && substr($path, 0, 1) eq '{') {
$path = join '/', $path, shift @path while @path && $path !~ /}/;
1  lib/SOAP/Lite/Packager.pm
View
@@ -121,6 +121,7 @@ sub initialize_parser {
$self->{'_parser'}->output_to_core('ALL');
$self->{'_parser'}->tmp_to_core(1);
$self->{'_parser'}->ignore_errors(1);
+ $self->{'_parser'}->extract_nested_messages(0);
}
sub generate_random_string {
3  lib/SOAP/Packager.pm
View
@@ -13,7 +13,7 @@ package SOAP::Packager;
use strict;
use vars;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
our $SUPPORTED_TYPES = { };
sub BEGIN {
@@ -115,6 +115,7 @@ sub initialize_parser {
$self->{'_parser'}->output_to_core('ALL');
$self->{'_parser'}->tmp_to_core(1);
$self->{'_parser'}->ignore_errors(1);
+ $self->{'_parser'}->extract_nested_messages(0);
}
sub generate_random_string {
2  lib/SOAP/Test.pm
View
@@ -11,7 +11,7 @@
package SOAP::Test;
use 5.006;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
our $TIMEOUT = 5;
8 lib/SOAP/Transport/HTTP.pm
View
@@ -12,7 +12,7 @@ package SOAP::Transport::HTTP;
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use SOAP::Lite;
use SOAP::Packager;
@@ -44,7 +44,8 @@ sub patch {
}
{
- package LWP::Protocol;
+ package
+ LWP::Protocol;
local $^W = 0;
my $collect = \&collect; # store original
*collect = sub {
@@ -303,6 +304,7 @@ sub send_receive {
$self->message( $self->http_response->message );
$self->is_success( $self->http_response->is_success );
$self->status( $self->http_response->status_line );
+ return if ($self->http_response->is_success == 0);
# Pull out any cookies from the response headers
$self->{'_cookie_jar'}->extract_cookies( $self->http_response )
@@ -818,7 +820,7 @@ sub handler {
$self->request(
HTTP::Request->new(
$r->method() => $r->uri,
- HTTP::Headers->new( $r->headers_in ),
+ HTTP::Headers->new( %{ $r->headers_in } ),
$content
) );
$self->SUPER::handle;
2  lib/SOAP/Transport/IO.pm
View
@@ -12,7 +12,7 @@ package SOAP::Transport::IO;
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use IO::File;
use SOAP::Lite;
2  lib/SOAP/Transport/LOCAL.pm
View
@@ -13,7 +13,7 @@ package SOAP::Transport::LOCAL;
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
# ======================================================================
2  lib/SOAP/Transport/MAILTO.pm
View
@@ -13,7 +13,7 @@ package SOAP::Transport::MAILTO;
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use MIME::Lite;
use URI;
2  lib/SOAP/Transport/POP3.pm
View
@@ -12,7 +12,7 @@ package SOAP::Transport::POP3;
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use Net::POP3;
use URI;
14 lib/UDDI/Lite.pm
View
@@ -12,12 +12,12 @@ package UDDI::Lite;
use 5.006;
use strict;
{
-our $VERSION = 0.715;
+our $VERSION = 0.716;
}
# ======================================================================
package UDDI::Constants;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
BEGIN
{
@@ -706,7 +706,7 @@ BEGIN
# ======================================================================
package UDDI::SOM;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use vars qw(@ISA);
@ISA = qw(SOAP::SOM);
@@ -721,7 +721,7 @@ sub result
# ======================================================================
package UDDI::Data;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use Carp ();
@@ -866,7 +866,7 @@ sub AUTOLOAD
# ======================================================================
package UDDI::Serializer;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use vars qw(@ISA);
@ISA = qw(SOAP::Serializer);
@@ -924,7 +924,7 @@ sub encode_array
# ======================================================================
package UDDI::Deserializer;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use vars qw(@ISA);
@ISA = qw(SOAP::Deserializer);
@@ -955,7 +955,7 @@ sub deserialize
# ======================================================================
package UDDI::Lite;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use vars qw(@ISA $AUTOLOAD %EXPORT_TAGS);
use Exporter;
2  lib/XML/Parser/Lite.pm
View
@@ -14,7 +14,7 @@ package XML::Parser::Lite;
use strict;
use warnings;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
sub new {
my $class = shift;
2  lib/XMLRPC/Lite.pm
View
@@ -13,7 +13,7 @@ package XMLRPC::Lite;
use SOAP::Lite;
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
# ======================================================================
2  lib/XMLRPC/Test.pm
View
@@ -12,7 +12,7 @@ package XMLRPC::Test;
use 5.004;
use vars qw($VERSION $TIMEOUT);
-our $VERSION = 0.715;
+our $VERSION = 0.716;
$TIMEOUT = 5;
2  lib/XMLRPC/Transport/HTTP.pm
View
@@ -12,7 +12,7 @@ package XMLRPC::Transport::HTTP;
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use XMLRPC::Lite;
2  lib/XMLRPC/Transport/POP3.pm
View
@@ -12,7 +12,7 @@ package XMLRPC::Transport::POP3;
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use XMLRPC::Lite;
use SOAP::Transport::POP3;
2  lib/XMLRPC/Transport/TCP.pm
View
@@ -12,7 +12,7 @@ package XMLRPC::Transport::TCP;
use strict;
-our $VERSION = 0.715;
+our $VERSION = 0.716;
use XMLRPC::Lite;
16 t/02-payload.t
View
@@ -10,7 +10,12 @@ BEGIN {
use strict;
use Test;
-BEGIN { plan tests => 131 }
+BEGIN {
+ my @todo;
+ $] >= 5.017010
+ and push @todo, 37;
+ plan tests => 133, todo => \@todo;
+}
use SOAP::Lite;
$SIG{__WARN__} = sub { ; }; # turn off deprecation warnings
@@ -97,6 +102,12 @@ my($a, $s, $r, $serialized, $deserialized);
<item2 xsi:type="xsd:int">60</item2>
<item2 xsi:type="xsd:int">100</item2>
<item3 xsi:type="xsd:int">200</item3>
+<item3 xsi:type="xsd:int">200</item3>
+<item4 xsi:type="xsd:int">200</item4>
+<item4 xsi:type="xsd:int">200</item4>
+<item5 xsi:type="xsd:int">400</item5>
+<item5 xsi:type="xsd:int">450</item5>
+<item6 xsi:type="xsd:int">600</item6>
</nums>
</m:doublerResponse>
</soap:Body>
@@ -108,6 +119,9 @@ my($a, $s, $r, $serialized, $deserialized);
ok($deserialized->valueof("$result/[1]") == 20);
ok($deserialized->valueof("$result/[3]") == 60);
ok($deserialized->valueof("$result/[5]") == 200);
+ ok($deserialized->valueof("$result/[9]") == 400);
+ # Test more than 9 items to check depth is okay - RT78692
+ ok($deserialized->valueof("$result/[11]") == 600);
# match should return true/false in boolean context (and object ref otherwise)
ok($deserialized->match('aaa') ? 0 : 1);
180 t/04-attach.t
View
@@ -1,35 +1,36 @@
#!/bin/env perl
BEGIN {
- unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- unshift @INC, '../lib' if -d '../lib';
- }
+ unless ( grep /blib/, @INC ) {
+ chdir 't' if -d 't';
+ unshift @INC, '../lib' if -d '../lib';
+ }
}
use strict;
use Test;
BEGIN {
- use SOAP::Lite;
- eval { SOAP::Packager::MIME->new->initialize_parser; 1 };
- if ($@) {
- $@ =~ s/ at .+//;
- print "1..0 # Skip: $@"; exit;
- }
+ use SOAP::Lite;
+ eval { SOAP::Packager::MIME->new->initialize_parser; 1 };
+ if ($@) {
+ $@ =~ s/ at .+//;
+ print "1..0 # Skip: $@";
+ exit;
+ }
}
BEGIN { plan tests => 15 }
-my($a, $soap, $d, $s, $r, $serialized, $deserialized);
+my ( $a, $soap, $d, $s, $r, $serialized, $deserialized );
-{ # check attachment deserialization
- $soap = SOAP::Lite->new();
- $soap->init_context();
+{ # check attachment deserialization
+ $soap = SOAP::Lite->new();
+ $soap->init_context();
- ##############################################################################
- print "Attachment deserialization (Content-ID) test(s)...\n";
- $a = $soap->deserializer->deserialize(<<'EOX');
+ ##############################################################################
+ print "Attachment deserialization (Content-ID) test(s)...\n";
+ $a = $soap->deserializer->deserialize(<<'EOX');
Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="<claim061400a.xml@claiming-it.com>"
SOAPAction: http://schemas.risky-stuff.com/Auto-Claim
Content-Description: This is the optional message description.
@@ -83,17 +84,19 @@ Content-ID: <claim061400a.realxml@claiming-it.com>
EOX
- ok(ref $a);
- ok(ref $a && ref $a->valueof('//insurance_claim_auto') &&
- $a->valueof('//insurance_claim_auto')->{theCrashPhoto} =~ /JPEG/);
- ok(ref $a && $a->valueof('//theCrashPhoto') =~ /Raw JPEG image/);
- ok(ref $a && $a->valueof('//theSignedForm') eq "\0\1\2\3 \4\5\6");
- ok(ref $a && $a->valueof('//somexml') =~ m!<a><b>c</b></a>!);
- ok(ref $a && $a->valueof('//realxml')->{b} eq 'c');
-
- ##############################################################################
- print "Attachment deserialization (Content-ID and Content-Location) test(s)...\n";
- $a = $soap->deserializer->deserialize(<<'EOX');
+ ok( ref $a );
+ ok( ref $a
+ && ref $a->valueof('//insurance_claim_auto')
+ && $a->valueof('//insurance_claim_auto')->{theCrashPhoto} =~ /JPEG/ );
+ ok( ref $a && $a->valueof('//theCrashPhoto') =~ /Raw JPEG image/ );
+ ok( ref $a && $a->valueof('//theSignedForm') eq "\0\1\2\3 \4\5\6" );
+ ok( ref $a && $a->valueof('//somexml') =~ m!<a><b>c</b></a>! );
+ ok( ref $a && $a->valueof('//realxml')->{b} eq 'c' );
+
+ ##############################################################################
+ print
+"Attachment deserialization (Content-ID and Content-Location) test(s)...\n";
+ $a = $soap->deserializer->deserialize(<<'EOX');
MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="<http://claiming-it.com/claim061400a.xml>"
Content-Description: This is the optional message description.
@@ -127,16 +130,19 @@ Content-Location: http://claiming-it.com/claim061400a.tiff
EOX
- ok(ref $a);
- ok(ref $a && ref $a->valueof('//insurance_claim_auto') &&
- $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/);
- ok(ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/);
+ ok( ref $a );
+ ok( ref $a
+ && ref $a->valueof('//insurance_claim_auto')
+ && $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/ );
+ ok( ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/ );
- ##############################################################################
- print "Attachment deserialization (relative Content-Location) test(s)...\n";
- # TODO - this unit test breaks - it does not seem to be picking up a base location
- # from outer Content-Location
- eval { $a = $soap->deserializer->deserialize(<<'EOX'); };
+ ##############################################################################
+ print "Attachment deserialization (relative Content-Location) test(s)...\n";
+
+# TODO - this unit test breaks - it does not seem to be picking up a base location
+# from outer Content-Location
+ eval {
+ $a = $soap->deserializer->deserialize(<<'EOX'); };
MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="<http://claiming-it.com/claim061400a.xml>"
Content-Description: This is the optional message description.
@@ -170,14 +176,16 @@ Content-Location: claim061400a.tiff
--MIME_boundary--
EOX
- ok(ref $a);
- ok(ref $a && ref $a->valueof('//insurance_claim_auto') &&
- $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/);
- ok(ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/);
-
- ##############################################################################
- print "Attachment deserialization (no default Content-Location) test(s)...\n";
- $a = $soap->deserializer->deserialize(<<'EOX');
+ ok( ref $a );
+ ok( ref $a
+ && ref $a->valueof('//insurance_claim_auto')
+ && $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/ );
+ ok( ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/ );
+
+ ##############################################################################
+ print
+ "Attachment deserialization (no default Content-Location) test(s)...\n";
+ $a = $soap->deserializer->deserialize(<<'EOX');
MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="<b6f4ccrt@15.4.9.92/s445>"
Content-Description: This is the optional message description.
@@ -210,10 +218,82 @@ Content-Location: the_signed_form.tiff
--MIME_boundary-
EOX
-# <theSignedForm href="cid:the_signed_form.tiff"/>
- ok(ref $a);
- ok(ref $a && ref $a->valueof('//insurance_claim_auto') &&
- $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/);
- ok(ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/);
+ # <theSignedForm href="cid:the_signed_form.tiff"/>
+
+ ok( ref $a );
+ ok( ref $a
+ && ref $a->valueof('//insurance_claim_auto')
+ && $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/ );
+ ok( ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/ );
+
+ # check attachment of composite element
+ $soap = SOAP::Lite->new();
+ $soap->init_context();
+
+ ##############################################################################
+ print "Attachment deserialization (Nested Attachment) test(s)...\n";
+ $a = $soap->deserializer->deserialize(<<'EOX');
+Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="<claimstart.xml@claiming-it.com>"
+SOAPAction: http://schemas.risky-stuff.com/Auto-Claim
+Content-Description: This is the optional message description.
+
+--MIME_boundary
+Content-Type: text/xml; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Content-ID: <claimstart.xml@claiming-it.com>
+
+<?xml version='1.0' ?>
+<soap:Envelope
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <claim:insurance_claim_auto
+ id="insurance_claim_document_id"
+ xmlns:claim="http://schemas.risky-stuff.com/Auto-Claim">
+ <email href="cid:email.eml@claiming-it.com" />
+ </claim:insurance_claim_auto>
+ </soap:Body>
+</soap:Envelope>
+
+--MIME_boundary
+Content-Type: message/rfc822
+Content-Transfer-Encoding: binary
+Content-ID: <email.eml@claiming-it.com>
+
+MIME-Version: 1.0
+X-Mailer: MIME::Lite 3.01 (F2.74; T1.24; A1.74; B3.07; Q3.07)
+Date: Thu, 30 Apr 2009 15:59:49 -0400
+To: foo@bar.com
+Subject: multipart message
+Content-Transfer-Encoding: binary
+Content-Type: multipart/related; boundary="_----------=_1241121589160890"
+
+This is a multi-part message in MIME format.
+
+--_----------=_1241121589160890
+Content-Disposition: inline
+Content-Length: 36
+Content-Transfer-Encoding: binary
+Content-Type: text/html
+
+<body>Here's <i>my</i> text</body>
+--_----------=_1241121589160890
+Content-Disposition: inline
+Content-Length: 16
+Content-Transfer-Encoding: binary
+Content-Type: text/plain
+
+ Here's my text
+--_----------=_1241121589160890--
+
+--MIME_boundary--
+
+EOX
+
+ ok( ref $a );
+ ok( ref $a
+ && ref $a->valueof('//insurance_claim_auto')
+ && $a->valueof('//insurance_claim_auto')->{email} =~
+ m{my(</i>)? text} );
+ ok( ref $a && $a->valueof('//email') =~ m{my(</i>)? text} );
}
Please sign in to comment.
Something went wrong with that request. Please try again.