Message277350
The problem is in `urlunparse`. If you check the RFC 2396, it has the following regular expression:
^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
where group 3 is the //netloc, and 4 is netloc substring, of an url http://netloc/foobar - and this is what Python should use to parse an URI using RFC 2396... but:
>>> pat.fullmatch('////netloc').group(4)
''
>>> pat.fullmatch('/relative').group(4)
>>>
Someone took the shortcut. no netloc is different from netloc being the empty string '', but
>>> urlparse('////netloc')
ParseResult(scheme='', netloc='', path='//netloc', params='', query='', fragment='')
>>> urlparse('/netloc')
ParseResult(scheme='', netloc='', path='/netloc', params='', query='', fragment='')
In the latter parsing result netloc should be *None*. Unfortunately I believe it is too late to change this either way. |
|
Date |
User |
Action |
Args |
2016-09-25 08:56:19 | ztane | set | recipients:
+ ztane, orsenthil, pitrou, vstinner, christian.heimes, benjamin.peterson, python-dev, martin.panter, PaulMcMillan, soilandreyes, yaaboukir |
2016-09-25 08:56:18 | ztane | set | messageid: <1474793778.84.0.0306960822314.issue23505@psf.upfronthosting.co.za> |
2016-09-25 08:56:18 | ztane | link | issue23505 messages |
2016-09-25 08:56:18 | ztane | create | |
|