mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Issue #749: Add optional SNI support for python2.
SNI support will be enabled for python2 if ndg-httpsclient and pyopenssl are available.
This commit is contained in:
@@ -125,3 +125,4 @@ Patches and Suggestions
|
||||
- Dmitry Medvinsky <me@dmedvinsky.name>
|
||||
- Bryce Boe <bbzbryce@gmail.com> @bboe
|
||||
- Colin Dunklau <colin.dunklau@gmail.com> @cdunklau
|
||||
- Hugo Osvaldo Barrera <hugo@osvaldobarrera.com.ar> @hobarrera
|
||||
|
||||
@@ -48,6 +48,12 @@ __author__ = 'Kenneth Reitz'
|
||||
__license__ = 'Apache 2.0'
|
||||
__copyright__ = 'Copyright 2013 Kenneth Reitz'
|
||||
|
||||
# Attempt to enable urllib3's SNI support, if possible
|
||||
try:
|
||||
from requests.packages.urllib3.contrib import pyopenssl
|
||||
pyopenssl.inject_into_urllib3()
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from . import utils
|
||||
from .models import Request, Response, PreparedRequest
|
||||
|
||||
Reference in New Issue
Block a user