[Patches] [ python-Patches-591713 ] Fix "file:" URL to have right no. of /'s
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 25 Sep 2002 12:22:58 -0700
Patches item #591713, was opened at 2002-08-06 15:26
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=591713&group_id=5470
Category: Library (Lib)
Group: None
>Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Bruce Atherton (callenish)
Assigned to: Neal Norwitz (nnorwitz)
>Summary: Fix "file:" URL to have right no. of /'s
Initial Comment:
If you run urlparse.urljoin() on a file: URL, the resulting URL
has together with the wrong number of '/'s in it.
Properly formed, the URL (assuming no netloc) should have
three slashes, so that it looks like "file:///...". The current
code drops that down to one.
The error appears to be in a condition in urlunsplit(). It
doesn't show up except in this one instance because the
test is only run iff the scheme is in the list of those that can
take a netloc and there is no netloc present in the URL.
Apparently, this is pretty rare.
Patch attached that corrects the condition.
----------------------------------------------------------------------
>Comment By: Neal Norwitz (nnorwitz)
Date: 2002-09-25 15:22
Message:
Logged In: YES
user_id=33168
Checked in as:
* urlparse.py 1.33 and 1.31.6.2
* test_urlparse.py 1.7 and 1.2.24.2
* output/test_urlparse 1.2.24.2
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-09-25 10:46
Message:
Logged In: YES
user_id=3066
Looks good to me; go ahead and check it in with the tests.
Thanks!
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2002-09-17 17:22
Message:
Logged In: YES
user_id=33168
Not sure who is best to review this? Fred? Jeremy?
Someone else?
This patch works for me. I have a test too. Assign back to
me if you want me to check it in.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=591713&group_id=5470