[Python-bugs-list] [Bug #111725] Response to bug 110619

noreply@sourceforge.net noreply@sourceforge.net
Fri, 11 Aug 2000 15:30:02 -0700


Bug #111725, was updated on 2000-Aug-11 15:30
Here is a current snapshot of the bug.

Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Response to bug 110619

Details: It probably should be documented somewhere that for urllib, proxies will not work in the environment variable http_proxy
The code looks at http://usr:pwd@com:8080 and parses the pwd@com:8080 as a port number and fails. It also ignores the proxy details here. If the proxy details are put into the url, as argument to urlopen, they still don't work, although they are parsed correctly. I'm behind a firewall and this bugged me for some time, as I always received a http error code of 407. Afyter some research of the protocol, etc. I finally resolved it by modifying urllib in the open_http method and changed the line:

if auth: h.putheader('Authorization',...
  to
if auth: h.putheader('Proxy-Authorization',...

and it worked! Needless to say, whatever aspect of the http protocol requires this to be 'Authorization' will of course now fail for my version of urllib, but at least the proxy part functions correctly. Sorry I can't give any better details as I am not an http guru, just fumbling along!

Hope this helps.

Cheers,
  Perry Faulkner

(Perry.Faulkner@macquarie.com.au)


For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111725&group_id=5470