mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 08:14:16 +03:00
fixed url checker ':' to 'http' (#4678)
This commit is contained in:
parent
f9a0db3ee0
commit
2ec3db8177
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user