Browse Source

Allow IPv6 -http arguments of the form "[::1]:". (#177)

Sanjay Ghemawat 8 years ago
parent
commit
805912e798
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      internal/driver/webui.go

+ 1
- 1
internal/driver/webui.go View File

100
 	if ln, err = net.Listen("tcp", hostport); err != nil {
100
 	if ln, err = net.Listen("tcp", hostport); err != nil {
101
 		return nil, "", false, err
101
 		return nil, "", false, err
102
 	}
102
 	}
103
-	url = fmt.Sprint("http://", host, ":", ln.Addr().(*net.TCPAddr).Port)
103
+	url = fmt.Sprint("http://", net.JoinHostPort(host, fmt.Sprint(ln.Addr().(*net.TCPAddr).Port)))
104
 	return ln, url, isLocalhost(host), nil
104
 	return ln, url, isLocalhost(host), nil
105
 }
105
 }
106
 
106