urllib.urlopen unwanted password prompts - documentation problem

J

John Nagle

If you try to open a password protected page with "urllib.urlopen()", you get

"Enter username for EnterPassword at example.com:"

on standard output, followed by a read for input! This seems to be an
undocumented feature, if not a bug. Definitely the documentation for
"urllib" should mention this. The effects of this in a CGI program
are not good.

A workaround is described here: "http://cis.poly.edu/cs912/urlopen.txt"
"URLopener" and "FancyURLopener" in urllib have many overrideable
functions, none of which are documented at python.org and should be.

There was once documentation at

http://epydoc.sourceforge.net/stdlib/public/urllib.FancyURLopener-class.html

but its current status is:

An error has been encountered in accessing this page.

1. Server: epydoc.sourceforge.net
2. URL path: /stdlib/public/urllib.FancyURLopener-class.html
3. Error notes: File does not exist:
/home/groups/e/ep/epydoc/htdocs/stdlib/public/urllib.FancyURLopener-class.html
4. Error type: 404
5. Request method: GET
6. Request query string:
7. Time: 2006-12-27 13:18:11 PST (1167254291)

Reporting this problem: The problem you have encountered is with a project web
site hosted by SourceForge.net. This issue should be reported to the
SourceForge.net-hosted project (not to SourceForge.net).

John Nagle
 
J

John J. Lee

John Nagle said:
If you try to open a password protected page with "urllib.urlopen()", you get

"Enter username for EnterPassword at example.com:"

on standard output, followed by a read for input! This seems to be an
undocumented feature, if not a bug. Definitely the documentation for
"urllib" should mention this. The effects of this in a CGI program
are not good.

A workaround is described here: "http://cis.poly.edu/cs912/urlopen.txt"
"URLopener" and "FancyURLopener" in urllib have many overrideable
functions, none of which are documented at python.org and should be.
[...]

Bug reports tend not to result in a fix being applied unless the
reporter him/herself actually goes to the trouble of filing a patch at
sourceforge.net :

http://sourceforge.net/tracker/?group_id=5470&atid=305470


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top