A problem with urllib

Peter Hansen peter at engcorp.com
Mon Jul 1 00:16:33 EDT 2002


Aki Niimura wrote:
> 
> urllib doesn't like user to be an empty string. Thus, it keeps asking
> a new user, passwd input (another call to prompt_user_passwd() ).
> And eventually it went crazy (recursive error?).

Are you using the latest version?  I don't have a server that has
a user "" to check this, but from looking at the source it really
looks like it would allow either the username or the password to
be empty, but not both.  This is with Python 2.2.1.

I tried a URL in urlopen() similar to the one you gave 
(http://:admin@192.168.1.1/Status.htm) and it didn't complain,
and tried opening the page with that information.

-Peter



More information about the Python-list mailing list