On 19 May, 2008, at 16:36, Daniel Miller wrote:
Ronald,
This version is now merged into urllib and commited as revision
63159 in the trunk.
Ahh, sorry I'm late. I was on vacation last week when you posted
this. Here's an updated version with a bit less duplication (about
55 lines removed). This seems like it will be much easier to
maintain (IMHO).
That version looks fine, I'll probably update urllib.py sometime
tomorrow.
Also, I'm sure you know what you're doing so I left the code as it
was, but this line (and other related lines) looked suspicious to me:
proxies["ftp"] = "http://%s:%i" % (proxy, port)
Did you want the URL to be encoded with 'http://' on the front even
though it is an FTP proxy?
That is indeed intentional. Most webproxies proxy FTP using ftp://
URLs, I haven't seen a "true" FTP proxy for a long time.
BTW. the version of urllib in the stdlib is slightly newer than what I
posted. I had to add annotations for argument- and result-types to
ensure that the code works in 64-bit mode as well.
Ronald
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig