Skip to content
Permalink
Browse files

fix #1756 -- use correct IPv6 URLs

  • Loading branch information
Kwpolska committed Jun 2, 2015
1 parent e23b70a commit 5133ac3208f24893d9bb4b5e106356c5483bece2
Showing with 8 additions and 3 deletions.
  1. +8 −3 nikola/plugins/command/auto/__init__.py
@@ -187,10 +187,15 @@ def __call__(self, environ, start_response):
app=Mixed(handler_cls=LRSocket)
)
ws.initialize_websockets_manager()
self.logger.info("Serving on port {0}...".format(port))

# Yes, this is racy
self.logger.info("Serving HTTP on {0} port {1}...".format(host, port))
if browser:
if options['ipv6'] or '::' in host:
server_url = "http://[{0}]:{1}/".format(host, port)
else:
server_url = "http://{0}:{1}/".format(host, port)

self.logger.info("Opening {0} in the default web browser...".format(server_url))
# Yes, this is racy
webbrowser.open('http://{0}:{1}'.format(host, port))

try:

0 comments on commit 5133ac3

Please sign in to comment.