summaryrefslogtreecommitdiff
path: root/cherrypy/_cpwsgi.py
diff options
context:
space:
mode:
Diffstat (limited to 'cherrypy/_cpwsgi.py')
-rw-r--r--cherrypy/_cpwsgi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cherrypy/_cpwsgi.py b/cherrypy/_cpwsgi.py
index f6db68b0..a8068fb0 100644
--- a/cherrypy/_cpwsgi.py
+++ b/cherrypy/_cpwsgi.py
@@ -296,7 +296,8 @@ class AppResponse(object):
"""Create a Request object using environ."""
env = self.environ.get
- local = httputil.Host('', int(env('SERVER_PORT', 80)),
+ local = httputil.Host('',
+ int(env('SERVER_PORT', 80) or -1),
env('SERVER_NAME', ''))
remote = httputil.Host(env('REMOTE_ADDR', ''),
int(env('REMOTE_PORT', -1) or -1),