Message371135
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. |
|
Date |
User |
Action |
Args |
2020-06-09 18:55:11 | taleinat | set | recipients:
+ taleinat, orsenthil, Ido Michael, David Bell |
2020-06-09 18:55:11 | taleinat | set | messageid: <1591728911.89.0.0865581263209.issue40594@roundup.psfhosted.org> |
2020-06-09 18:55:11 | taleinat | link | issue40594 messages |
2020-06-09 18:55:11 | taleinat | create | |
|