support dat

merge-requests/8/head
Bob Mottram 2021-01-04 19:11:17 +00:00
parent 11d7192edb
commit 3837ee2536
1 changed files with 2 additions and 2 deletions

View File

@ -833,11 +833,11 @@ def load_document(url):
# validate URL
pieces = urllib_parse.urlparse(url)
if (not all([pieces.scheme, pieces.netloc]) or
pieces.scheme not in ['http', 'https'] or
pieces.scheme not in ['http', 'https', 'dat'] or
set(pieces.netloc) > set(
string.ascii_letters + string.digits + '-.:')):
raise JsonLdError(
'URL could not be dereferenced; only "http" and "https" '
'URL could not be dereferenced; only http/https/dat '
'URLs are supported.',
'jsonld.InvalidUrl', {'url': url},
code='loading document failed')