Skip Menu |
 

This queue is for tickets about the Net-RDAP CPAN distribution.

Report information
The Basics
Id: 127684
Status: resolved
Priority: 0/
Queue: Net-RDAP

People
Owner: Nobody in particular
Requestors: alain.rioux.610 [...] gmail.com
Cc:
AdminCc:

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



Subject: Two problems
Date: Sat, 17 Nov 2018 09:20:14 -0500
To: bug-Net-RDAP [...] rt.cpan.org
From: Alain Rioux <alain.rioux.610 [...] gmail.com>
Download (untitled) / with headers
text/plain 980b
Hi, I want to report two problems I had with the module Net::RDAP (0.11). Here is the code I used: use strict; use Net::RDAP; my $rdap = Net::RDAP->new; my $object = $rdap->ip(Net::IP->new('123.123.123.123')); The first problem is related to the path used for temp file. The problem is at the line 281 of Registry.pm. my $file = sprintf('%s/%s-%s', File::Spec->tmpdir, *$package*, basename($url)); As it uses the package name in the filename (Net::RDAP::), it fails on Windows because ":" is not allowed in a filename. I add a "$package =~ s/\:\:/-/g;" before the line to fix the problem. The second problem I got is at the line 121 of Registry.pm: return $package->assemble_url($package->get_best_url(@urls), 'ip', *$ip->prefix*); The url becomes "https://rdap.apnic.net/ip/123.123.123.123%2F32". The result is a bad request error. The problem seems related to the uri encoding, as "https://rdap.apnic.net/ip/123.123.123.123/32" will work. Hope that helps! Alain Rioux
Download (untitled) / with headers
text/plain 1.2k
On Sat Nov 17 09:20:35 2018, alain.rioux.610@gmail.com wrote: Show quoted text
> Hi, > > I want to report two problems I had with the module Net::RDAP (0.11). Here > is the code I used: > > use strict; > use Net::RDAP; > my $rdap = Net::RDAP->new; > my $object = $rdap->ip(Net::IP->new('123.123.123.123')); > > The first problem is related to the path used for temp file. The problem is > at the line 281 of Registry.pm. > > my $file = sprintf('%s/%s-%s', File::Spec->tmpdir, *$package*, > basename($url)); > > As it uses the package name in the filename (Net::RDAP::), it fails on > Windows because ":" is not allowed in a filename. I add a "$package =~ > s/\:\:/-/g;" before the line to fix the problem. > > The second problem I got is at the line 121 of Registry.pm: > > return $package->assemble_url($package->get_best_url(@urls), 'ip', > *$ip->prefix*); > > The url becomes "https://rdap.apnic.net/ip/123.123.123.123%2F32". The > result is a bad request error. The problem seems related to the uri > encoding, as "https://rdap.apnic.net/ip/123.123.123.123/32" will work. > > Hope that helps! > > Alain Rioux
Please review the changes here: https://gitlab.centralnic.com/centralnic/perl-net-rdap/compare/master...rt-issue-127684 If they work, let me know and I'll roll a new release.
Subject: Re: [rt.cpan.org #127684] Two problems
Date: Sat, 1 Dec 2018 08:45:06 -0500
To: bug-Net-RDAP [...] rt.cpan.org
From: Alain Rioux <alain.rioux.610 [...] gmail.com>
Download (untitled) / with headers
text/plain 1.5k
Hi, Everything seems ok on my side! Alain Rioux Le jeu. 29 nov. 2018 à 10:16, Gavin Brown via RT <bug-Net-RDAP@rt.cpan.org> a écrit : Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=127684 > > > On Sat Nov 17 09:20:35 2018, alain.rioux.610@gmail.com wrote:
> > Hi, > > > > I want to report two problems I had with the module Net::RDAP (0.11).
> Here
> > is the code I used: > > > > use strict; > > use Net::RDAP; > > my $rdap = Net::RDAP->new; > > my $object = $rdap->ip(Net::IP->new('123.123.123.123')); > > > > The first problem is related to the path used for temp file. The problem
> is
> > at the line 281 of Registry.pm. > > > > my $file = sprintf('%s/%s-%s', File::Spec->tmpdir, *$package*, > > basename($url)); > > > > As it uses the package name in the filename (Net::RDAP::), it fails on > > Windows because ":" is not allowed in a filename. I add a "$package =~ > > s/\:\:/-/g;" before the line to fix the problem. > > > > The second problem I got is at the line 121 of Registry.pm: > > > > return $package->assemble_url($package->get_best_url(@urls), 'ip', > > *$ip->prefix*); > > > > The url becomes "https://rdap.apnic.net/ip/123.123.123.123%2F32". The > > result is a bad request error. The problem seems related to the uri > > encoding, as "https://rdap.apnic.net/ip/123.123.123.123/32" will work. > > > > Hope that helps! > > > > Alain Rioux
> > Please review the changes here: > > > https://gitlab.centralnic.com/centralnic/perl-net-rdap/compare/master...rt-issue-127684 > > If they work, let me know and I'll roll a new release. >
Download (untitled) / with headers
text/plain 1.7k
Thanks! I'm uploading 0.12 now. On Sat Dec 01 08:45:28 2018, alain.rioux.610@gmail.com wrote: Show quoted text
> Hi, > > Everything seems ok on my side! > > Alain Rioux > > Le jeu. 29 nov. 2018 à 10:16, Gavin Brown via RT <bug-Net- > RDAP@rt.cpan.org> > a écrit : >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=127684 > > > > > On Sat Nov 17 09:20:35 2018, alain.rioux.610@gmail.com wrote:
> > > Hi, > > > > > > I want to report two problems I had with the module Net::RDAP > > > (0.11).
> > Here
> > > is the code I used: > > > > > > use strict; > > > use Net::RDAP; > > > my $rdap = Net::RDAP->new; > > > my $object = $rdap->ip(Net::IP->new('123.123.123.123')); > > > > > > The first problem is related to the path used for temp file. The > > > problem
> > is
> > > at the line 281 of Registry.pm. > > > > > > my $file = sprintf('%s/%s-%s', File::Spec->tmpdir, *$package*, > > > basename($url)); > > > > > > As it uses the package name in the filename (Net::RDAP::), it fails > > > on > > > Windows because ":" is not allowed in a filename. I add a "$package > > > =~ > > > s/\:\:/-/g;" before the line to fix the problem. > > > > > > The second problem I got is at the line 121 of Registry.pm: > > > > > > return $package->assemble_url($package->get_best_url(@urls), 'ip', > > > *$ip->prefix*); > > > > > > The url becomes "https://rdap.apnic.net/ip/123.123.123.123%2F32". > > > The > > > result is a bad request error. The problem seems related to the uri > > > encoding, as "https://rdap.apnic.net/ip/123.123.123.123/32" will > > > work. > > > > > > Hope that helps! > > > > > > Alain Rioux
> > > > Please review the changes here: > > > > > > https://gitlab.centralnic.com/centralnic/perl-net- > > rdap/compare/master...rt-issue-127684 > > > > If they work, let me know and I'll roll a new release. > >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.