Export to GitHub

httplib2 - issue #207

Advanced not tunneled HTTP proxy support


Posted on Apr 26, 2012 by Happy Lion

What is the context?

Cannot connect to Google Calendar using python REST library when using httplib2 inside my company network. Actually my company uses a squid proxy with user-agent filtering.

What steps will reproduce the problem?

  1. Support of PROXY_TYPE_HTTP_NO_TUNNEL with reverse dns (rdns = True)
  2. Support HTTP proxy with User-Agent Http Header filtering

What is the expected output?

Proxy config done like this: my_proxy_info = httplib2.ProxyInfo(proxy_type = httplib2.socks.PROXY_TYPE_HTTP_NO_TUNNEL, proxy_host = 'xxx.xxx.xxx.xxx', proxy_port = xxxx, proxy_user = 'myLogin', proxy_pass = 'myPassword', proxy_rdns = True, proxy_user_agent = 'myCompanyUserAgent' ) Use of REST Google API with companies proxy.

What do you see instead?

  • ServerNotFoundError for 1. HTTP_NO_TUNNEL and rdns = True
  • httplib2.socks.HTTPError: (403, 'Forbidden') for 2. When User-Agent isn't correctly configured.

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

  • httplib2-0.7.4-py2.7
  • google_api_python_client-1.0beta8-py2.7
  • Windows XP

Please provide any additional information below.

Point 1 is link to the Issue 113: http://code.google.com/p/httplib2/issues/detail?id=113

Solutions

I already implement the solutions. For point 1 the changes are in the init.py file and for point 2 in the sock.py file

Attachments

Status: New

Labels:
Type-Defect Priority-Medium