set scheme to http if not provided
This commit is contained in:
parent
4ce699e57f
commit
f96ab02767
|
@ -460,7 +460,10 @@ class Sanic:
|
||||||
|
|
||||||
if external:
|
if external:
|
||||||
if not scheme:
|
if not scheme:
|
||||||
scheme = netloc[:8].split(':', 1)[0]
|
if ':' in netloc[:8]:
|
||||||
|
scheme = netloc[:8].split(':', 1)[0]
|
||||||
|
else:
|
||||||
|
scheme = 'http'
|
||||||
|
|
||||||
if '://' in netloc[:8]:
|
if '://' in netloc[:8]:
|
||||||
netloc = netloc.split('://', 1)[-1]
|
netloc = netloc.split('://', 1)[-1]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user