Commits

Robert Brewer  committed d96d3c6

Fix for #1034 (WsgiApp fails when env var REMOTE_PORT is set to '').

  • Participants
  • Parent commits 2d1d1b1

Comments (0)

Files changed (1)

File cherrypy/_cpwsgi.py

         local = httputil.Host('', int(env('SERVER_PORT', 80)),
                            env('SERVER_NAME', ''))
         remote = httputil.Host(env('REMOTE_ADDR', ''),
-                               int(env('REMOTE_PORT', -1)),
+                               int(env('REMOTE_PORT', -1) or -1),
                                env('REMOTE_HOST', ''))
         scheme = env('wsgi.url_scheme')
         sproto = env('ACTUAL_SERVER_PROTOCOL', "HTTP/1.1")