kamawanu / googlecode-gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
1 stars 0 forks source link

http proxy server mismatch #311

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.using http proxy, not https
2.using https to login. eg, url = https://www.google.com/accounts/ClientLogin
3.will encounter the problem

What is the expected output? What do you see instead?
I expected to login in successfully, however I failed.

What version of the product are you using?
2.05

Please provide any additional information below.

I think the defect is in the http.py file, class ProxiedHttpClient, method
_prepare_connection.

in the _prepare_connection method, it will using the url protocol to
determine the protocol of the http(s) proxy server.So if the url is https,
then it use https_proxy, if the url is http, it use http_proxy.

I think the proper procedure should be:

try to get https_proxy and http_proxy value.

if url is https 
  if https_proxy exist then using https_proxy 
  else if http_proxy exist then using http_proxy
  else
       visit without proxy server 
if url is http 
  if http_proxy exist then using http_proxy
  else if https_proxy exist then using https_proxy   
  else
       visit without proxy server

Original issue reported on code.google.com by kuangye1...@gmail.com on 26 Nov 2009 at 9:09

GoogleCodeExporter commented 9 years ago
I'm having the same problem and can't use the service without the use of the 
proxy
server.  And my environment is using a proxy file on a server, not an 
environment
variable.

Original comment by will.sid...@gmail.com on 4 Dec 2009 at 9:55

GoogleCodeExporter commented 9 years ago

Original comment by afs...@google.com on 7 Oct 2011 at 11:38

GoogleCodeExporter commented 9 years ago
Since no GData APIs support non-HTTPS endpoints any more, I suspect that this 
can no longer be an issue. Is it even possible to use an HTTP proxy for 
HTTPS-only service? I would appreciate any feedback, thanks. 

Original comment by afs...@google.com on 18 Dec 2011 at 5:09