Commits

Christian Wyglendowski  committed f901b14

Fix for #491. Added underscore_names for a few Request object attributes.

  • Participants
  • Parent commits fdd6488

Comments (0)

Files changed (2)

File cherrypy/_cphttptools.py

         remoteHost should be string of the client's IP address.
         scheme should be a string, either "http" or "https".
         """
+        self.remote_addr  = remoteAddr
+        self.remote_port  = remotePort
+        self.remote_host  = remoteHost
+        # backward compatibility
         self.remoteAddr = remoteAddr
         self.remotePort = remotePort
         self.remoteHost = remoteHost
+        
         self.scheme = scheme
         self.execute_main = True
         self.closed = False

File cherrypy/test/test_core.py

         hMap['content-length'] = 18
         hMap['server'] = 'CherryPy headertest'
         hMap['location'] = ('%s://127.0.0.1:%s/headers/'
-                            % (cherrypy.request.remotePort,
+                            % (cherrypy.request.remote_port,
                                cherrypy.request.scheme))
         
         # Set a rare header for fun