Skip Menu |
 

This queue is for tickets about the URI CPAN distribution.

Report information
The Basics
Id: 2558
Status: resolved
Priority: 0/
Queue: URI

People
Owner: Nobody in particular
Requestors: imacat [...] mail.imacat.idv.tw
Cc:
AdminCc:

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



Subject: Incorrect rel when port was set
Download (untitled) / with headers
text/plain 693b
The following script: #! /usr/bin/perl -w use strict; use URI qw(); use vars qw($uri $base); $base = new URI("http://test.net/cgi-bin/test.cgi"); $uri = new URI("http://test.net/cgi-bin/counter.cgi"); $_ = $uri->rel($base); print "\$base: ".$base->canonical."\n"; print "rel: ".$_->canonical."\n"; $base->port(80); $_ = $uri->rel($base); print "\$base: ".$base->canonical."\n"; print "rel: ".$_->canonical."\n"; __END__ produces different results at these 2 times. I had tried to trace the code. It seems that $uri->authority returns different result before and after setting $uri->port(80). I can't read the code inside the authority method. I had better leave the solution to you.


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.