Support http.publish_host addresses
This commit is contained in:
@@ -245,6 +245,14 @@ class Transport(object):
|
|||||||
if not address or ":" not in address:
|
if not address or ":" not in address:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if '/' in address:
|
||||||
|
# Support 7.x host/ip:port behavior where http.publish_host has been set.
|
||||||
|
fqdn, ipaddress = address.split('/', 1)
|
||||||
|
host["host"] = fqdn
|
||||||
|
_, host["port"] = ipaddress.rsplit(':', 1)
|
||||||
|
host["port"] = int(host["port"])
|
||||||
|
|
||||||
|
else:
|
||||||
host["host"], host["port"] = address.rsplit(":", 1)
|
host["host"], host["port"] = address.rsplit(":", 1)
|
||||||
host["port"] = int(host["port"])
|
host["port"] = int(host["port"])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user