From 063bd357f3bcd29eeb4c128f75519f9af41ff411 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Wed, 21 Jul 2010 17:25:08 -0400 Subject: [PATCH] Set SERVER_PORT correctly when not specified. --- gunicorn/http/wsgi.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gunicorn/http/wsgi.py b/gunicorn/http/wsgi.py index ac188991..dff650bd 100644 --- a/gunicorn/http/wsgi.py +++ b/gunicorn/http/wsgi.py @@ -71,7 +71,12 @@ def create(req, sock, client, server, cfg): if isinstance(server, basestring): server = server.split(":") if len(server) == 1: - server.append('') + if url_scheme == "http": + server.append("80") + elif url_scheme == "https": + server.append("443") + else: + server.append('') path_info = req.path if script_name: