Ilya Konstantinov <ilya.konstanti...@gmail.com> added the comment:

>From RFC-1738:

hostname       = *[ domainlabel "." ] toplabel
domainlabel    = alphadigit | alphadigit *[ alphadigit | "-" ] alphadigit
toplabel       = alpha | alpha *[ alphadigit | "-" ] alphadigit
alphadigit     = alpha | digit

However:

py> urlparse('https://foo\\bar/baz')
ParseResult(scheme='https', netloc='foo\\bar', path='/baz', params='', 
query='', fragment='')

The hostname's BNF doesn't allow for a backslash ('\\') character, so I'd 
expect urlparse to raise a ValueError for this "URL".

----------
nosy: +Ilya Konstantinov

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35748>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to