Ticket #36 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

pkipplib and HTTP proxies

Reported by: Mark Swift Owned by: jerome
Priority: major Milestone:
Component: pkipplib Version: development
Keywords: Cc:

Description

A quick pkipplip bug report, which I think is really due a bug in Python. (tried 2.3.5 and 2.5.1 on OSX).


I get problems with pkipplip when I run it on a system that has a
http_proxy env defined or a system-wide proxy defined.
It seems that urllib2 does not yet respect the no_proxy env variable.

The following mentions a fix in Python 2.6 for urllib, but doesn't
mention if the same problem has been fixed for urllib2...


See "What's New in Python 2.6 alpha1"
at http://svn.python.org/view/python/trunk/Misc/NEWS?rev=60134&view=markup under #856047


#856047: respect the no_proxy environment variable when using the http_proxy etc. environment variables in urllib.

The problem goes away if the ProxyHandler? is cleared in your doRequest() routine like in (excerpt from the submitted patch) :

 authhandler = urllib2.HTTPBasicAuthHandler(pwmanager)
 proxyhandlr = ullib2.ProxyHandler({})
 opener = urllib2.build_opener(proxyhandlr, authhandler)
 urllib2.install_opener(opener)

This means that the connection will never go through a proxy. Maybe this is fine until Python is fixed...

Change History

Changed 14 years ago by jerome

  • status changed from new to accepted

Changed 14 years ago by jerome

  • status changed from accepted to closed
  • resolution set to fixed

(In [3468]) Fixes #36 thanks to Mark Swift.

Note: See TracTickets for help on using tickets.