Merge pull request #1769 from anx-ckreuzberger/master

Fix for #1755: Decode remote addr if it is a byte
This commit is contained in:
Randall Leeds 2018-05-02 11:52:42 -07:00 committed by GitHub
commit e73ca252f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,7 +158,7 @@ def create(req, sock, client, server, cfg):
if isinstance(client, string_types):
environ['REMOTE_ADDR'] = client
elif isinstance(client, binary_type):
environ['REMOTE_ADDR'] = str(client)
environ['REMOTE_ADDR'] = client.decode()
else:
environ['REMOTE_ADDR'] = client[0]
environ['REMOTE_PORT'] = str(client[1])