Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Viktor Haag · committed by Viktor Haag · parent 00ab8fb · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:requests/adapters.py+1 added-1 removed
116 unmodified lines
117 :param url: The requested URL.118 :param verify: Whether we should actually verify the certificate.119 :param cert: The SSL certificate to verify.120 """121 if url.startswith('https') and verify:121 if url.lower.startswith('https') and verify:122123 cert_loc = None124125 # Allow self-specified cert location.
217 unmodified lines
modified:requests/sessions.py+1 added-1 removed
465 unmodified lines
466 def get_adapter(self, url):467 """Returns the appropriate connnection adapter for the given URL."""468 for (prefix, adapter) in self.adapters.items():469470 if url.startswith(prefix):470 if url.lower.startswith(prefix):471 return adapter472473 # Nothing matches :-/474 raise InvalidSchema("No connection adapters were found for '%s'" % url)
27 unmodified lines