Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > urllib and bypass proxy

Reply
Thread Tools

urllib and bypass proxy

 
 
kc
Guest
Posts: n/a
 
      04-03-2008
Under MS Windows, I encountered a problem with the proxy bypass
specification. In windows, the bypass specification for the proxy
uses semi-colons to delimit entries. Mine happens to have two
semi-colons back-to-back. Internet explorer handles this just fine but
urllib equates this with ALWAYS bypass the proxy. (I'm using Python
2.5.2)

This is caused because the double semi-colon is turned into an empty
string entry and at the bottom of urllib.py, and empty string can
always be found in a host name. Therefore it always chooses to bypass
the proxy.

Of course the fix is to get rid of the double colon in the bypass
settings in internet explorer (which I did). But it took me an hour to
track this down (first time using urllib). Perhaps a better fix
would be to test for the empty string and continue the loop in that
case. From urllib.py:

# now check if we match one of the registry values.
for test in proxyOverride:
if test == "": continue
test = test.replace(".", r"\.") # mask dots

This is not really a bug but rather a way to be more consistent with
internet explorer. If this has value, do I submit a bug report or does
someone else?
 
Reply With Quote
 
 
 
 
Konstantin Veretennicov
Guest
Posts: n/a
 
      04-05-2008
On Thu, Apr 3, 2008 at 9:21 PM, kc <(E-Mail Removed)> wrote:

> If this has value, do I submit a bug report or does
> someone else?


You do (http://bugs.python.org)

--
kv
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2to3 urllib.URLopener -> urllib.request.URLopener Chris McDonald Python 0 11-01-2010 11:23 AM
Asynchronous urllib (urllib+asyncore)? Jonathan Gardner Python 1 02-27-2008 12:51 AM
proxy bypass jetmike1@excite.com Cisco 2 01-05-2007 04:49 PM
Bypass proxy to access local network URLs ash_mod2@hotmail.com Java 0 02-15-2005 07:58 PM
Bypass(exempt) site with Microsoft Proxy 2.0 =?Utf-8?B?Z3JpZmxldA==?= Microsoft Certification 0 06-02-2004 09:06 PM



Advertisments