fixed url checker ':' to 'http' (#4678)

This commit is contained in:
Mohammad Ashraful Islam 2017-02-01 18:20:06 +06:00 committed by Tom Christie
parent f9a0db3ee0
commit 2ec3db8177

View File

@ -114,7 +114,7 @@ if requests is not None:
self.mount('https://', adapter) self.mount('https://', adapter)
def request(self, method, url, *args, **kwargs): def request(self, method, url, *args, **kwargs):
if ':' not in url: if not url.startswith('http'):
raise ValueError('Missing "http:" or "https:". Use a fully qualified URL, eg "http://testserver%s"' % url) raise ValueError('Missing "http:" or "https:". Use a fully qualified URL, eg "http://testserver%s"' % url)
return super(RequestsClient, self).request(method, url, *args, **kwargs) return super(RequestsClient, self).request(method, url, *args, **kwargs)