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?
- Support of PROXY_TYPE_HTTP_NO_TUNNEL with reverse dns (rdns = True)
- 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
- socks.py 18.44KB
- __init__.py 67.5KB
Status: New
Labels:
Type-Defect
Priority-Medium