SYN-187: Set a more sensible default for the content_addr

pull/26/merge v0.5.3b
Mark Haines 2014-12-02 17:20:02 +00:00
parent bde9ee5a4c
commit 7993e3d10d
1 changed files with 5 additions and 2 deletions

View File

@ -35,8 +35,11 @@ class ServerConfig(Config):
if not args.content_addr:
host = args.server_name
if ':' not in host:
host = "%s:%d" % (host, args.bind_port)
args.content_addr = "https://%s" % (host,)
host = "%s:%d" % (host, args.unsecure_port)
else:
host = host.split(':')[0]
host = "%s:%d" % (host, args.unsecure_port)
args.content_addr = "http://%s" % (host,)
self.content_addr = args.content_addr