8000 fix issue #165. Sometimes apache don't specify the port ipv6 address are · alex-python/gunicorn@43dfb8f · GitHub
[go: up one dir, main page]

Skip to content

Commit 43dfb8f

Browse files
committed
fix issue benoitc#165. Sometimes apache don't specify the port ipv6 address are
in the form of aaaa:aaaa:... . Thanks to zauberpony for first implementation of the patch.
1 parent 75fec00 commit 43dfb8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gunicorn/http/wsgi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ def create(req, sock, client, server, cfg):
8181
# find host and port on ipv6 address
8282
if '[' in forward and ']' in forward:
8383
host = forward.split(']')[0][1:].lower()
84-
elif ":" in 7662 forward:
84+
elif ":" in forward and forward.count(":") == 1:
8585
host = forward.split(":")[0].lower()
8686
else:
8787
host = forward
8888

8989
forward = forward.split(']')[-1]
90-
if ":" in forward:
90+
if ":" in forward and forward.count(":") == 1:
9191
port = forward.split(':', 1)[1]
9292
else:
9393
port = 80

0 commit comments

Comments
 (0)
0