[Python-Dev] urllib2 doesn't grok URLs w/ user/passwd
skip at pobox.com
Tue Dec 30 10:03:55 EST 2003
SF seems to be down for some unscheduled reason. Posting here just so I
don't completely forget about it should I exit my web browser before SF is
urllib2.urlopen("http://email@example.com/") fails (at least in part)
because it fails to separate the username and password from the hostname.
Trying to open http://foo:firstname.lastname@example.org/ reveals other shortcomings in
its url parsing. It seems to me the syntactic bits shouldn't be difficult
to resolve using urllib.spluituser(). I'm much less clear what to do with
the username and password once they've been separated from the hostname.
More information about the Python-Dev