This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: incomplete proxy handling in URLLIB
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: tim.peters Nosy List: gvanrossum, tim.peters
Priority: low Keywords: patch

Created on 2001-02-06 14:57 by anonymous, last changed 2022-04-10 16:03 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
None nobody, 2001-02-06 14:57 None
Messages (6)
msg35585 - (view) Author: Nobody/Anonymous (nobody) Date: 2001-02-06 14:57
under WinNT, the proxy code takes the proxy values from the registry, but does *not* check for the proxy override settings. The supplied patch does take care of it and works for me. Not very sophisticated, but operational.
msg35586 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-03-02 07:07
Logged In: YES 
user_id=6380

Tim, you seem to be using a proxy, so maybe you can give
this a try?
Also, it has Win specific code (_winreg usage).

If you can't or don't want to, please give it back.
msg35587 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-03-18 05:23
Logged In: YES 
user_id=31435

Back to you!  I've spent enough time on it, but I don't 
know this code, and it turns out I never get into it 
anyway.  @Home uses the AutoConfigURL registry gimmick 
rather than ProxyEnable (which is 0 on my box) and 
ProxyOverride (which doesn't exist on my box).

Even if they did exist, the new proxy_bypass() routine 
isn't called if the url passed to open_http() is a string, 
and it always is a string for me.  Trying to trace *that* 
back, this is apparently because the NT getproxies() 
function returns {}, and again because @Home isn't enabling 
ProxyEnable.

So best I can say is that this code doesn't hurt me.

Note that there are jarring style differences with 
surrounding code, primarily use of Capitalized words for 
local vrbl names.  Also lines and comments spilling past 
column 80.  The list() call in

list(proxyOverrd.split(';'))

doesn't appear to make sense (.split() returns a list!).  
For that matter proxyOverrd is an ugly abbreviation.
msg35588 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-03-19 00:08
Logged In: YES 
user_id=6380

Back to you, Tim.  I'm also an @home user so I can't test this either.

I agree with the style comments.

Also, it translates a pattern to regular expression; an easier way to do this is to use fnmatch (which also takes 
care of the case insensitive match when it's on Windows).

Would the original submitter care to clean up the code according to the (Tim's & my) comments?

Otherwise I think this is sufficiently low priority that I'm not going to move heaven & earth to get it into 2.1b2 (this 
Friday), and after that I'm not going to allow *anything* new in the code base for 2.1.
msg35589 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-08-09 16:06
Logged In: YES 
user_id=6380

I'm accepting this. The original submitter didn't care to
clean it up, so I'm lowering the priority. Tim, just check
it in -- if it's broken we'll hear about it.
msg35590 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-08-09 18:06
Logged In: YES 
user_id=31435

Cleaned up the most egregious style clashes, and checked in:

Lib/urllib.py, new revision: 1.129

Don't know whether it works.  Didn't bother with fnmatch 
(simply because I'm not going to make substantive changes 
to code I don't understand and can't test).
History
Date User Action Args
2022-04-10 16:03:42adminsetgithub: 33859
2001-02-06 14:57:58anonymouscreate