Skip Menu |

This queue is for tickets about the URI CPAN distribution.

Report information
The Basics
Id: 63757
Status: new
Priority: 0/
Queue: URI

People
Owner: Nobody in particular
Requestors: schmorp [...] schmorp.de
Cc:
AdminCc:

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



Subject: weird behaviour of URI->rel with double slashes
Date: Wed, 8 Dec 2010 23:51:12 +0100
To: bug-URI [...] rt.cpan.org
From: Marc Lehmann <schmorp [...] schmorp.de>
Hi! I found rather weird behaviour with double slashes in URIs, when using the rel method (URI version 1.56): # perl -MURI -e 'warn URI->new("http://localhost///boot")->rel("http://localhost/")' ////boot at -e line 1. here is a table, all for rel("http://localhost/"): http://localhost/boot boot http://localhost//boot //boot/boot http://localhost///boot ////boot http://localhost////boot /////boot None of these except for the first look right to me, and firefox agrees (which doesn't necessarily mean much). I have no clue how /// becomes four slashes in the third example, the second example will result in http://boot/boot, because it is a net-path, and the third and fourth are also interpreted as net-path by firefox. I don't know what the correct behaviour should be (for cases 2, 3 and 4), actually - I guess either leave it absolute (safest), use some kind of "/." prefix (for example, http://localhost/ + /.//boot becomes http://localhost:81//boot in firefox). Greetings, -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\