File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 14
14
# CalDAV server hostnames separated by a comma
15
15
# IPv4 syntax: address:port
16
16
# IPv6 syntax: [address]:port
17
- # For example: 0.0.0.0:9999, [::]:9999
17
+ # Hostname syntax (using "getaddrinfo" to resolve to IPv4/IPv6 adress(es)): hostname:port
18
+ # For example: 0.0.0.0:9999, [::]:9999, localhost:9999
18
19
#hosts = localhost:5232
19
20
20
21
# Max parallel connections
Original file line number Diff line number Diff line change @@ -67,7 +67,10 @@ def format_address(address: ADDRESS_TYPE) -> str:
67
67
if not isinstance (host , str ):
68
68
raise NotImplementedError ("Unsupported address format: %r" %
69
69
(address ,))
70
- return "[%s]:%d" % (host , port )
70
+ if host .find (":" ) == - 1 :
71
+ return "%s:%d" % (host , port )
72
+ else :
73
+ return "[%s]:%d" % (host , port )
71
74
72
75
73
76
class ParallelHTTPServer (socketserver .ThreadingMixIn ,
You can’t perform that action at this time.
0 commit comments