Subject: | [PATCH] SOAP::WSDL uses default User-Agent |
SOAP::WSDL currently uses a non-customizable default lwp user-agent of
the format libwww-perl/xxxxx. The attached patch changes it to instead
use qq[SOAP::WSDL $VERSION], for both WSDL retrieval in wsdl2perl.pl,
and more importantly for requests from a SOAP::WSDL based client.
I'd also encourage you to make the user-agent customizable, on top of
having this as a default.
The attached patch is against SVN trunk.
Subject: | soap-wsdl.patch |
Index: lib/SOAP/WSDL.pm
===================================================================
--- lib/SOAP/WSDL.pm (revision 759)
+++ lib/SOAP/WSDL.pm (working copy)
@@ -125,6 +125,7 @@
? (keep_alive => 1)
: ()
);
+ $lwp->agent(qq[SOAP::WSDL $VERSION]);
my $response = $lwp->get( $wsdl_of{ $ident } );
croak $response->message() if ($response->code != 200);
Index: lib/SOAP/WSDL/Transport/HTTP.pm
===================================================================
--- lib/SOAP/WSDL/Transport/HTTP.pm (revision 759)
+++ lib/SOAP/WSDL/Transport/HTTP.pm (working copy)
@@ -16,6 +16,10 @@
}
}
+sub _agent {
+ return qq[SOAP::WSDL $VERSION];
+}
+
sub send_receive {
my ($self, %parameters) = @_;
my ($envelope, $soap_action, $endpoint, $encoding, $content_type) =