Skip Menu |

This queue is for tickets about the XML-RPC CPAN distribution.

Report information
The Basics
Id: 118475
Status: new
Priority: 0/
Queue: XML-RPC

People
Owner: Nobody in particular
Requestors: internationils [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: XML::RPC not reporting error if https connection requested but LWP::Protocol::https not installed
Date: Sun, 23 Oct 2016 10:02:10 +0200
To: bug-XML-RPC [...] rt.cpan.org
From: Nils <internationils [...] gmx.net>
Hello,

XML::RPC is not reporting an error if a https connection is requested but LWP::Protocol::https is not installed.

I was trying to get http://doc.rpc.gandi.net/domain/usage.html (first example with version.info) to work, and getting the following (I added a p $api; to see if the New was succeeding):
You can even try it without an API key to reproduce:
use XML::RPC;
use Data::Printer;
my $api = XML::RPC->new('https://rpc.gandi.net/xmlrpc/');
p $api;
my $apikey = 'my 24-character API key';
my $version = $api->call( 'version.info', $apikey );
p $version;


$ ./upload-cert.pl 
XML::RPC  {
    public methods (19) : call, create_call_xml, create_fault_xml, create_response_xml, list, new, parse, parse_array, parse_scalar, parse_struct, receive, unparse_array, unparse_call, unparse_response, unparse_scalar, unparse_struct, unparse_value, xml_in, xml_out
    private methods (0)
    internals: {
        tpp   XML::TreePP,
        url   "https://rpc.gandi.net/xmlrpc/"
    }
}
no data at /home/nils/perl5/lib/perl5/XML/RPC.pm line 255.


Trying the same call with RPC::XML gave the following error:

$ ./upload-cert2.pl 
"RPC::XML::Client::send_request: HTTP server error: Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)"
Can't locate object method "new" via package "XML::RPC" (perhaps you forgot to load "XML::RPC"?) at ./upload-cert2.pl line 19.
Error: RPC::XML::Client::send_request: HTTP server error: Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)

Installing LWP::Protocol::https made it work with both XML::RPC and RPC::XML

Please detect this error and report it as RPC::XML does, it will save someone a few hours.

Thanks
Nils