kennethreitz/requests — pull request #1385 by ViktorHaag (2013-05-24 15:27:59+00:00)
Title: Cope with mixed-case URL schemes (like 'HTTP') by lower-ifying 'url' string before calling startswith() on it

The URL specification (RFC 2396) recommends that resilient platforms support upper-case letters in scheme specifiers.

At the moment `requests.sessions.Session.get_adapter(self,url)` and `requests.adapters.HTTPAdapter.cert_verify(self,conn,url,verify,cert)` do a `url.startswith()` that match against 'http' and/or 'https' (lower case only), not admitting for the possibility of an upper-case or mixed-case scheme in the url being examined.

In these cases, can we do a url.lower.startswith() instead of simply url.startswith() to allow for mixed case schemes and still be able to effectively match against 'http' and 'https'?