mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix issue #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.
This commit is contained in:
parent
75fec00896
commit
43dfb8f0f7
@ -81,13 +81,13 @@ def create(req, sock, client, server, cfg):
|
||||
# find host and port on ipv6 address
|
||||
if '[' in forward and ']' in forward:
|
||||
host = forward.split(']')[0][1:].lower()
|
||||
elif ":" in forward:
|
||||
elif ":" in forward and forward.count(":") == 1:
|
||||
host = forward.split(":")[0].lower()
|
||||
else:
|
||||
host = forward
|
||||
|
||||
forward = forward.split(']')[-1]
|
||||
if ":" in forward:
|
||||
if ":" in forward and forward.count(":") == 1:
|
||||
port = forward.split(':', 1)[1]
|
||||
else:
|
||||
port = 80
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user