pwsm / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

httplib2 does not detect proxy configuration #159

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install httplib2 0.7.1 and socksipy-branch 1.0.2 on a system that requires 
an HTTP proxy for external access.
2. import httplib2; httplib2.Http().request('http://www.google.com')

What is the expected output? What do you see instead?

Based on using urllib2 and httplib, I would expect the connection to go through 
the proxy servers as defined in the environment variables http_proxy or 
https_proxy and no_proxy.

Instead, the connection times out.

Opening the same URL with urllib2 works just fine.

What version of the product are you using? On what operating system?

0.7.1 on Python 2.7 on Ubuntu 10.04

Please provide any additional information below.

Requiring the client to do proxy detection and configuration (as the current 
API seems to enforce). Someone writing against httplib2 who wants to support 
both proxied and non-proxied environments must perform the detection and set up 
their httplib2.Http objects based on the results.

At the very least, httplib2 should expose functions for detecting and 
configuring using the de-facto standard of environment variables. The principle 
of least surprise says this configuration should be called automatically such 
that httplib2 can be used in as similar fashion as urllib2 and httplib.

Original issue reported on code.google.com by jaraco%jaraco.com@gtempaccount.com on 20 Jul 2011 at 4:42

GoogleCodeExporter commented 8 years ago
I've patched this in https://bitbucket.org/jaraco/httplib2 and a packaged 
version is available at 
https://bitbucket.org/jaraco/httplib2/downloads/httplib2-0.8.0dev2.zip

Original comment by jaraco%jaraco.com@gtempaccount.com on 9 Aug 2011 at 4:17

GoogleCodeExporter commented 8 years ago
Fixed in 
https://bitbucket.org/jaraco/httplib2/changesets/tip/branch(%22issue%20159%22)

Original comment by jar...@jaraco.com on 1 Dec 2011 at 9:19

GoogleCodeExporter commented 8 years ago
Fixed in 
http://code.google.com/p/httplib2/source/detail?r=638870ad5b1b684bde3ceb031e3b6e
7e78bbed36

Thanks for the fix!

Original comment by joe.gregorio@gmail.com on 6 Jan 2012 at 2:37