client: fix image url parsing
This commit is contained in:
@@ -245,3 +245,9 @@ def parse_uri(uri: str):
|
||||
port = 80
|
||||
|
||||
return host, port, path
|
||||
|
||||
|
||||
def base_url(uri: str):
|
||||
parsed = urlsplit(uri)
|
||||
path = parsed.path.rsplit("/", 1)[0]
|
||||
return f"{parsed.scheme}://{parsed.hostname}{path}/"
|
||||
|
Reference in New Issue
Block a user