Fix case-insensitive comparison in get_adapter()

While trying to get the prefix for an url, the url was lowered before comparing but the prefix not, so if it contains non-lowercase characters (eg. https://api.example.com/sOmE_WeiRD_pReFIX/), it won't match.
This commit is contained in:
Alvaro Gutierrez Perez
2017-10-18 19:27:06 +02:00
committed by GitHub
parent 54ad3d6dcc
commit d3f14af44d
+1 -1
View File
@@ -696,7 +696,7 @@ class Session(SessionRedirectMixin):
"""
for (prefix, adapter) in self.adapters.items():
if url.lower().startswith(prefix):
if url.lower().startswith(prefix.lower()):
return adapter
# Nothing matches :-/