Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Suggest supporting proxy_rdns setting while constructing Httplib2.Http in client.py #172

Closed
kygx-legend opened this issue May 6, 2015 · 6 comments

Comments

@kygx-legend
Copy link

Such as class OAuth2WebServerFlow in client.py, when call step*() functions, it would construct Httplib2.Http objects. If using proxy, Httplib2.Http would use proxy from environment. However, if the proxy needs reverse DNS(rdns), all requests of Httplib2.Http are blocked and there're no methods to set proxy_rdns to True. The best way is to construct Httplib2.ProxyInfo object which has all proxy settings including proxy_rdns. Then make this as a parameter to construct Httplib2.Http.

@kygx-legend
Copy link
Author

A customer, depot_tools in Chromium would be blocked by this issue when running depot-tools-auth.py login codereview.chromium.org --auth-no-local-webserver. It occurs:

  File "/workspace/project/depot_tools/third_party/oauth2client/util.py", line 132, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/workspace/project/depot_tools/third_party/oauth2client/client.py", line 1282, in step2_exchange
    headers=headers)
  File "/workspace/project/depot_tools/third_party/httplib2/__init__.py", line 1593, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/workspace/project/depot_tools/third_party/httplib2/__init__.py", line 1335, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/workspace/project/depot_tools/third_party/httplib2/__init__.py", line 1263, in _conn_request
    raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
third_party.httplib2.ServerNotFoundError: Unable to find the server at accounts.google.com

@dhermes
Copy link
Contributor

dhermes commented Aug 31, 2015

This is somewhat related to #128.

In particular, "Determine what assumed interface of httplib2.Http is needed" requires finding every creation and use of an httplib2.Http object.

@kygx-legend
Copy link
Author

Thanks for reply! :)

BTW, would you guys start to solve this issue by wrapping a configurable httplib2.Http object?

@dhermes
Copy link
Contributor

dhermes commented Sep 1, 2015

I'd like to implement a transport module and just have our own custom Http class (or have a set of our own Http classes) and then allow people to define extensions e.g. oauth2client-requests which allowed using a different transport.

@kygx-legend
Copy link
Author

Got it. Looking forward to! :)

@theacodes
Copy link
Contributor

Thank you for creating this issue, however, this project is deprecatedand we will only be addressing critical security issues. You can read moreabout this deprecation here.

If you need support or help using this library, we recommend that you ask yourquestion on StackOverflow.

If you still think this issue is relevant and should be addressed, pleasecomment and let us know!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants