Support full URL in get command
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
@@ -30,7 +30,15 @@ def json_encode(s):
|
||||
return json.dumps(s, separators=(',',':')).encode()
|
||||
|
||||
|
||||
def validate_url(s):
|
||||
def validate_url_ending(s):
|
||||
if not s.endswith('/'):
|
||||
s = s + "/"
|
||||
return s
|
||||
|
||||
def uri_validator(x):
|
||||
from urllib.parse import urlparse
|
||||
try:
|
||||
result = urlparse(x)
|
||||
return all([result.scheme, result.netloc])
|
||||
except:
|
||||
return False
|
||||
Reference in New Issue
Block a user