New submission from Olivier Croquette:
Some servers allow the @ character is usernames. It gives URLs like:
ftp://[EMAIL PROTECTED]@host/dir
[EMAIL PROTECTED] could for example by an email address.
I am not sure if this is RFC compliant. What's sure is that is makes
trouble with urlparse:
>>> from urlparse import urlparse
>>> p = urlparse("ftp://[EMAIL PROTECTED]@host2/dir")
>>> print p.username
user
>>> print p.hostname
[EMAIL PROTECTED]
By using rsplit instead of split in lib/python2.5/urlparse.py, the
problem can be solved.
----------
components: Library (Lib)
messages: 58990
nosy: ocroquette
severity: normal
status: open
title: urlparse and usernames containing @
type: behavior
versions: Python 2.5
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1698>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com