Skip Menu |

This queue is for tickets about the URI CPAN distribution.

Report information
The Basics
Id: 105234
Status: rejected
Priority: 0/
Queue: URI

People
Owner: Nobody in particular
Requestors: molnar.balazs.david [...] gmail.com
Cc:
AdminCc:

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



Subject: FTP URI: query part appended to path?
Date: Mon, 15 Jun 2015 11:39:32 +0200
To: bug-URI [...] rt.cpan.org
From: Balázs Dávid Molnár <molnar.balazs.david [...] gmail.com>
Dear URI.pm Maintainers, I've found the following problem for URI.pm, version 1.59: 1. When trying to parse an FTP URI, the query part somehow becomes the part of path as well, for example.: $ perl -e 'use URI; my $u = URI->new("ftp://something.com/path?query"); print $u->path."\n".$u->query."\n";' /path?query query Shouldn't path be "/path" and query be "query" ? Interestingly, for an http URI, it works fine: $ perl -e 'use URI; my $u = URI->new("http://something.com/path?query"); print $u->path."\n".$u->query."\n";' /path query Requested details: $ uname -a Linux galadriel 3.2.0-84-generic #121-Ubuntu SMP Tue May 5 18:54:05 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux $ perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi Not sure if it's intentional, due to some hidden RFC declaration, if it is, feel free to reject this report. Thanks, Balazs Molnar
On 2015-06-15 02:39:45, molnar.balazs.david@gmail.com wrote: Show quoted text
> Dear URI.pm Maintainers, > > I've found the following problem for URI.pm, version 1.59: > > 1. When trying to parse an FTP URI, the query part somehow becomes the part > of path as well, for example.: > > $ perl -e 'use URI; my $u = URI->new("ftp://something.com/path?query"); > print $u->path."\n".$u->query."\n";' > /path?query > query > > Shouldn't path be "/path" and query be "query" ?
From RFC 1738 (https://www.ietf.org/rfc/rfc1738.txt): 3.2.2. FTP url-path The url-path of a FTP URL has the following syntax: <cwd1>/<cwd2>/.../<cwdN>/<name>;type=<typecode> There is no ?query component in FTP URLs, unlike with HTTP.