Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Engine Error with HTTPS #1503

Closed
speedplane opened this issue Dec 19, 2018 · 1 comment · Fixed by #1527
Closed

App Engine Error with HTTPS #1503

speedplane opened this issue Dec 19, 2018 · 1 comment · Fixed by #1527

Comments

@speedplane
Copy link

I believe the change in PR #1430 broke urllib3 on Google App Engine, which doesn't have _tunnel_host in its implementation of httplib. Not sure why this wasn't picked up by tests, but the fix is easy, simply adding if getattr(self, '_tunnel_host', None) part should go back in.

Below is a stacktrace of the error. Note that this is pure urllib3, no requests are being used.

Traceback (most recent call last):
  ...
  File "/project/updater/search_backend.py", line 1353, in setup
    "/_alias/%s"%self.index_name)
  File "/project/libs/elasticsearch_five/transport.py", line 312, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/project/libs/elasticsearch_five/connection/http_urllib3.py", line 114, in perform_request
    response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
  File "/project/libs/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/project/libs/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/project/libs/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/project/libs/urllib3/connection.py", line 304, in connect
    if self._tunnel_host:
AttributeError: 'VerifiedHTTPSConnection' object has no attribute '_tunnel_host'
speedplane added a commit to speedplane/urllib3 that referenced this issue Dec 19, 2018
…on. Make sure we check for that. urllib3#1503. Not this reverts part of the change in urllib3#1430.
speedplane added a commit to speedplane/urllib3 that referenced this issue Dec 19, 2018
…on. Make sure we check for that. urllib3#1503. Not this reverts part of the change in urllib3#1430.
@speedplane
Copy link
Author

See PR #1504 for the related PR.

jpevarnek added a commit to jpevarnek/urllib3 that referenced this issue Jan 24, 2019
urllib3 removed support for Python versions before 2.7 in a previous
pull request, unfortunately, this broke environments that use a
different implementation of httplib than the one in Python's standard
library as well. This includes Google App Engine's urlfetch-based
implementation
(https://github.com/GoogleCloudPlatform/python-compat-runtime/blob/master/appengine-compat/exported_appengine_sdk/google/appengine/dist27/gae_override/httplib.py#L362)

This pull request is nearly identical to urllib3#1504 which was
closed due to its author not responding to comments.

Fixes urllib3#1503
jpevarnek added a commit to jpevarnek/urllib3 that referenced this issue Jan 24, 2019
urllib3 removed support for Python versions before 2.7 in a previous
pull request, unfortunately, this broke environments that use a
different implementation of httplib than the one in Python's standard
library as well. This includes Google App Engine's urlfetch-based
implementation
(https://github.com/GoogleCloudPlatform/python-compat-runtime/blob/master/appengine-compat/exported_appengine_sdk/google/appengine/dist27/gae_override/httplib.py#L362)

This pull request is nearly identical to urllib3#1504 which was
closed due to its author not responding to comments.

Fixes urllib3#1503
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant