Lower-ify url before checking against prefix with startswith()

This commit is contained in:
Viktor Haag
2013-05-24 11:26:00 -04:00
parent 00ab8fbfea
commit 3004ad5398
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ class HTTPAdapter(BaseAdapter):
:param verify: Whether we should actually verify the certificate.
:param cert: The SSL certificate to verify.
"""
if url.startswith('https') and verify:
if url.lower.startswith('https') and verify:
cert_loc = None
+1 -1
View File
@@ -467,7 +467,7 @@ class Session(SessionRedirectMixin):
"""Returns the appropriate connnection adapter for the given URL."""
for (prefix, adapter) in self.adapters.items():
if url.startswith(prefix):
if url.lower.startswith(prefix):
return adapter
# Nothing matches :-/