Skip to content

Commit

Permalink
Set SERVER_PORT correctly when not specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
davisp committed Jul 21, 2010
1 parent ae721f0 commit 063bd35
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gunicorn/http/wsgi.py
Expand Up @@ -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:
Expand Down

0 comments on commit 063bd35

Please sign in to comment.