[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://firstname.lastname@example.org/") fails (at least in part)
because it fails to separate the username and password from the hostname.
Trying to open http://foo:email@example.com/ 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