diff --git a/AUTHORS.rst b/AUTHORS.rst index e61f8d99..bf7a8436 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -69,3 +69,5 @@ Patches and Suggestions - Ori Livneh - Jason Emerick - Bryan Helmig +- Jonas Obrist + diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index 216367a0..d1c2cd0c 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -53,9 +53,9 @@ Requests can verify SSL certificates for HTTPS requests, just like a web browser >>> requests.get('https://kennethreitz.com', verify=True) requests.exceptions.SSLError: hostname 'kennethreitz.com' doesn't match either of '*.herokuapp.com', 'herokuapp.com' -I don't have SSL setup on this domain, so it fails. Excellent. I do have certs for httpbin.org though:: +I don't have SSL setup on this domain, so it fails. Excellent. Github does though:: - >>> requests.get('https://httpbin.org', verify=True) + >>> requests.get('https://github.com', verify=True) You can also pass ``verify`` the path to a CA_BUNDLE file for private certs. You can also set the ``REQUESTS_CA_BUNDLE`` environment variable. diff --git a/requests/models.py b/requests/models.py index a16bcf23..6cb9aebb 100644 --- a/requests/models.py +++ b/requests/models.py @@ -298,7 +298,7 @@ class Request(object): scheme, netloc, path, params, query, fragment = urlparse(self.url) if not scheme: - raise ValueError() + raise ValueError("Invalid URL %r: No schema supplied" %self.url) netloc = netloc.encode('idna')