diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index 6b017357..ff75974d 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -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])