Fix client when using no ssl compression
Since the release of the 0.16.1 client, using the 'no ssl compression' option, whether on the command line, or via the library -- Nova does this by default -- a stack trace was generated. Closes-bug: 1442664 Related-bug: 1357430 Change-Id: I2b8ddcb0a7ae3cfccdfc20d3ba476f3b4f4ec32d
This commit is contained in:
@@ -22,8 +22,11 @@ from requests import adapters
|
||||
from requests import compat
|
||||
try:
|
||||
from requests.packages.urllib3 import connectionpool
|
||||
from requests.packages.urllib3 import poolmanager
|
||||
except ImportError:
|
||||
from urllib3 import connectionpool
|
||||
from urllib3 import poolmanager
|
||||
|
||||
|
||||
from oslo_utils import encodeutils
|
||||
import six
|
||||
@@ -146,6 +149,10 @@ class HTTPSAdapter(adapters.HTTPAdapter):
|
||||
https pool by setting glanceclient's
|
||||
one.
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
classes_by_scheme = poolmanager.pool_classes_by_scheme
|
||||
classes_by_scheme["glance+https"] = HTTPSConnectionPool
|
||||
super(HTTPSAdapter, self).__init__(*args, **kwargs)
|
||||
|
||||
def request_url(self, request, proxies):
|
||||
# NOTE(flaper87): Make sure the url is encoded, otherwise
|
||||
|
||||
Reference in New Issue
Block a user