[issue8818] urlsplit and urlparse add extra slash when using scheme

AdamN <adam@varud.com> added the comment: I would say right under: urlparse.urlparse(urlstring[, default_scheme[, allow_fragments]])¶ Put: urlstring is a pseudo-url. If the string has a scheme, it will be interpreted as a scheme, followed by a path, querystring and fragment. If it is prepended with a double-slash '//', it will be interpreted as a netloc followed by a path, querystring and fragment. Otherwise, it will be interpreted as a path followed by a querystring and fragment. I'm still confused about when anybody would use a relative path with a default scheme and no netloc but I'll leave that decision to you guys. Thanks, Adam ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8818> _______________________________________

Fred L. Drake, Jr. <fdrake@acm.org> added the comment: On Tue, May 25, 2010 at 3:03 PM, AdamN <report@bugs.python.org> wrote:
I'm still confused about when anybody would use a relative path with a default scheme and no netloc but I'll leave that decision to you guys.
The strings are not pseudo-URLs, they're relative references, as documented. This is used all the time in HREF and SRC attributes in web pages, which is exactly the use case for urlparse.urljoin(). ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8818> _______________________________________

Fred L. Drake, Jr. <fdrake@acm.org> added the comment: On Tue, May 25, 2010 at 3:03 PM, AdamN <report@bugs.python.org> wrote:
I'm still confused about when anybody would use a relative path with a default scheme and no netloc but I'll leave that decision to you guys.
The strings are not pseudo-URLs, they're relative references, as documented. This is used all the time in HREF and SRC attributes in web pages, which is exactly the use case for urlparse.urljoin(). ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8818> _______________________________________
participants (2)
-
AdamN
-
Fred L. Drake, Jr.