This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author taleinat
Recipients David Bell, Ido Michael, orsenthil, taleinat
Date 2020-06-09.18:55:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1591728911.89.0.0865581263209.issue40594@roundup.psfhosted.org>
In-reply-to
Content
Putting aside backwards compatibility, I would argue the opposite: Since consecutive slashes are valid, I suggest we would need to see that collapsing them into a single slash is the status quo, otherwise we should avoid such collapsing.

Here's some evidence that we should keep consecutive slashes:

1.
The curl cli does not appear to collapse consecutive slashes in URLs before sending them:

$ nc -l localhost 8000 &
[1] 39380
$ curl --dump-header - --proxy localhost:8000 --silent --max-time 1 http://www.example.com/this//double/path
GET http://www.example.com/this//double/path HTTP/1.1
Host: www.example.com
User-Agent: curl/7.64.1
Accept: */*
Proxy-Connection: Keep-Alive

[1]  + 39380 done       nc -l localhost 8000


2.
With NodeJS v10.18.0 and v12.16.1:

> const urllib = require('url');
> new url.URL("this//double/path", "http://www.example.com/").href
'http://www.example.com/this//double/path'


For me this is evidence enough that urljoin should *not* be collapsing consecutive slashes.
History
Date User Action Args
2020-06-09 18:55:11taleinatsetrecipients: + taleinat, orsenthil, Ido Michael, David Bell
2020-06-09 18:55:11taleinatsetmessageid: <1591728911.89.0.0865581263209.issue40594@roundup.psfhosted.org>
2020-06-09 18:55:11taleinatlinkissue40594 messages
2020-06-09 18:55:11taleinatcreate