use_ssl flag is set by Connection

This wasn't an issue before as scheme=https was not documented but now
it is in the docs and it makes this entire block be skipped if url is
given without scheme and no ssl_context is passed completely breaking
ssl
This commit is contained in:
Honza Král
2018-01-18 16:12:07 +01:00
parent 57ec404ba3
commit eaa67a100d
+1 -1
View File
@@ -84,7 +84,7 @@ class Urllib3HttpConnection(Connection):
raise ImproperlyConfigured("When using `ssl_context`, `use_ssl`, `verify_certs`, `ca_certs` and `ssl_version` are not permitted")
# if ssl_context provided use SSL by default
if use_ssl or ssl_context:
if self.use_ssl or ssl_context:
ca_certs = CA_CERTS if ca_certs is None else ca_certs
if not ca_certs and not ssl_context and verify_certs: